I\'m looking for a better way to do
if hash.key? :a && hash.key? :b && hash.key? :c && hash.key? :d
prefer
Just in the spirit of TIMTOWTDI, here's another way. If you require 'set' (in the std lib) then you can do this:
require 'set'
Set[:a,:b,:c,:d].subset? hash.keys.to_set