Here's the general format of the Ruby case statement:
case value when expression [, comparison]...[then | :] code when expression [, comparison]...[then | :] code . . . [else code] end