Created
January 4, 2016 15:49
-
-
Save HintikkaKimmo/c5d6e2a5bca42858db31 to your computer and use it in GitHub Desktop.
Solution for Formative Assignment for Module #2, Lesson #1: Case
Statement
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
some_var = "false" | |
another_var = "nil" | |
case | |
when some_var == "pink elephant" | |
puts "Don't think about the pink elephant!" | |
when another_var.nil? | |
puts "Question mark in the method name?" | |
else | |
puts "I guess nothing matched... But why?" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment