Class: AndMatcher

Inherits:
Matcher show all
Defined in:
lib/matcher.rb

Instance Method Summary collapse

Methods inherited from Matcher

#initialize

Constructor Details

This class inherits a constructor from Matcher

Instance Method Details

#match(obj) ⇒ Object



56
57
58
59
60
61
62
63
# File 'lib/matcher.rb', line 56

def match(obj)
  does_it_match = true 
  @query.values.first.each do |subquery|
    matcher = Matcher.new(subquery)
    does_it_match &&= matcher.match(obj) 
  end  
  return does_it_match
end