Created
February 27, 2016 16:55
-
-
Save xhoy/79c09091f9f1e7cbc379 to your computer and use it in GitHub Desktop.
case and hash?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def random() | |
x = {a: "asf"} | |
case x | |
when :b | |
"foo" | |
when :a | |
"bar" | |
else | |
"fail" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment