Skip to content

Instantly share code, notes, and snippets.

@oelmekki
Created January 10, 2011 13:56
Show Gist options
  • Save oelmekki/772793 to your computer and use it in GitHub Desktop.
Save oelmekki/772793 to your computer and use it in GitHub Desktop.
class Hash
def contains?( hash )
hash.each do |key,value|
return false unless ( self.has_key?( key ) and self[ key ] == value )
end
true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment