Class: AndPredicateMatcher

Inherits:
PredicateMatcher show all
Defined in:
lib/predicate_matcher.rb

Instance Method Summary collapse

Methods inherited from PredicateMatcher

#initialize

Constructor Details

This class inherits a constructor from PredicateMatcher

Instance Method Details

#match(value) ⇒ Object



36
37
38
39
40
41
42
43
# File 'lib/predicate_matcher.rb', line 36

def match(value)
  does_it_match = true
  @predicate.each do |k,v|
    matcher = PredicateMatcher.new({k => v})  
    does_it_match &&= matcher.match(value)
  end
  return does_it_match
end