Skip to content

Instantly share code, notes, and snippets.

@HintikkaKimmo
Created January 4, 2016 15:49
Show Gist options
  • Save HintikkaKimmo/c5d6e2a5bca42858db31 to your computer and use it in GitHub Desktop.
Save HintikkaKimmo/c5d6e2a5bca42858db31 to your computer and use it in GitHub Desktop.
Solution for Formative Assignment for Module #2, Lesson #1: Case Statement
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