Wouldn't a case statement work for this kind of thing?

-- 
Posted via http://www.ruby-forum.com/.