Skip to content

Instantly share code, notes, and snippets.

@stouset
Created July 29, 2010 20:58
Show Gist options
  • Save stouset/499221 to your computer and use it in GitHub Desktop.
Save stouset/499221 to your computer and use it in GitHub Desktop.
case
when foo then 1
when bar then 2
when baz then 3
else 4
end
# or
foo ? 1 \
: bar ? 2 \
: baz ? 3 \
: 4
# in > 1.9
foo ? 1
: bar ? 2
: baz ? 3
: 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment