Module: Humanoid::Matchers
- Defined in:
- lib/humanoid/matchers/gt.rb,
lib/humanoid/matchers.rb,
lib/humanoid/matchers/in.rb,
lib/humanoid/matchers/lt.rb,
lib/humanoid/matchers/ne.rb,
lib/humanoid/matchers/all.rb,
lib/humanoid/matchers/gte.rb,
lib/humanoid/matchers/lte.rb,
lib/humanoid/matchers/nin.rb,
lib/humanoid/matchers/size.rb,
lib/humanoid/matchers/exists.rb,
lib/humanoid/matchers/default.rb
Overview
:nodoc:
Defined Under Namespace
Classes: All, Default, Exists, Gt, Gte, In, Lt, Lte, Ne, Nin, Size
Instance Method Summary collapse
-
#matches?(selector) ⇒ Boolean
Determines if this document has the attributes to match the supplied MongoDB selector.
Instance Method Details
#matches?(selector) ⇒ Boolean
Determines if this document has the attributes to match the supplied MongoDB selector. Used for matching on embedded associations.
18 19 20 21 22 23 |
# File 'lib/humanoid/matchers.rb', line 18 def matches?(selector) selector.each_pair do |key, value| return false unless matcher(key, value).matches?(value) end true end |