Module: Delight::Enumerator::HashCollectionMatcher
- Defined in:
- lib/delight/enumerator/hash_collection_matcher.rb
Instance Method Summary collapse
Instance Method Details
#hash_collection_matcher(element, **kwargs) ⇒ Object
4 5 6 7 8 |
# File 'lib/delight/enumerator/hash_collection_matcher.rb', line 4 def hash_collection_matcher(element, **kwargs) kwargs.all? do |key, value| element.key?(key) && element.fetch(key) == value end end |