Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/hashtml/hash.rb
Instance Method Summary collapse
-
#include_pairs?(hash) ⇒ Boolean
Checks if an ‘hash’ is a subset of the object.
Instance Method Details
#include_pairs?(hash) ⇒ Boolean
Checks if an ‘hash’ is a subset of the object
7 8 9 |
# File 'lib/hashtml/hash.rb', line 7 def include_pairs?(hash) hash.select { |k, v| k if self[k] != v }.empty? end |