syntax question:

i have a 'case' expression:


case number
when 1: var = 'one'
when 2: var = 'two'
when 3: var = 'three'
else
        var = 'else'
end


but instead of assigning the 'var' variable for each 'when', what is the
way to write the case statement, so i can assign 'var' at the end?

(something like

case number
when 1: 'one'
when 2: 'two'
when 3: 'three'
else
        'else'
end >> var

[humm, a more elegant way]

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