case文

cond = 'hoge'

case cond
when /hoge/ then
  puts 'is hoge'
when /fuga/ then
  puts 'is fuga'
else
  puts 'unknown'
end