Skip to content

Instantly share code, notes, and snippets.

@clandry94
Created August 8, 2016 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clandry94/268ed3718209519a4196e178da55fa68 to your computer and use it in GitHub Desktop.
Save clandry94/268ed3718209519a4196e178da55fa68 to your computer and use it in GitHub Desktop.
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