Created
August 8, 2016 20:37
-
-
Save clandry94/268ed3718209519a4196e178da55fa68 to your computer and use it in GitHub Desktop.
This file contains 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
foo = {:bar => nil, :hello => "World" } | |
foo.keys.each do |key| | |
case key | |
when foo[key].nil? | |
puts "Nil!" | |
else | |
puts "Not Nil!" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment