Atalho para fazer caso / switch retornar um valor
Tenho certeza que vi alguém fazer uma técnica de atalho como o código abaixo (que não funciona)
return case guess
when guess > @answer then :high
when guess < @answer then :low
else :correct
end
Alguém sabe o truque que eu estou me referindo?