Class: Mongoid::DocumentPath::Node
- Inherits:
-
Object
- Object
- Mongoid::DocumentPath::Node
- Includes:
- Mongoid::Document
- Defined in:
- lib/mongoid/document_path/node.rb
Instance Method Summary collapse
Instance Method Details
#matches?(document) ⇒ Boolean
10 11 12 |
# File 'lib/mongoid/document_path/node.rb', line 10 def matches?(document) document.class.name == type && document.id.to_s == document_id end |
#terminal? ⇒ Boolean
14 15 16 |
# File 'lib/mongoid/document_path/node.rb', line 14 def terminal? relation.blank? end |