Method: MongoDoc::Matchers#matches?
- Defined in:
- lib/mongo_doc/matchers.rb
#matches?(selector) ⇒ Boolean
Determines if this document has the attributes to match the supplied MongoDB selector. Used for matching on embedded associations.
17 18 19 20 21 22 |
# File 'lib/mongo_doc/matchers.rb', line 17 def matches?(selector) selector.each_pair do |key, value| return false unless matcher(key, value).matches?(value) end true end |