Class: ActiveMongoid::Associations::One
- Defined in:
- lib/active_mongoid/associations/one.rb
Direct Known Subclasses
DocumentRelation::Referenced::In, DocumentRelation::Referenced::One, RecordRelation::Referenced::In, RecordRelation::Referenced::One
Instance Attribute Summary
Attributes inherited from Proxy
Instance Method Summary collapse
Methods inherited from Proxy
#init, #klass, #method_missing
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActiveMongoid::Associations::Proxy
Instance Method Details
#==(other) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/active_mongoid/associations/one.rb', line 13 def ==(other) return false unless other return true if target.object_id == other.object_id return true if target.attributes == other.attributes target == other end |
#clear ⇒ Object
5 6 7 |
# File 'lib/active_mongoid/associations/one.rb', line 5 def clear target.delete end |
#respond_to?(name, include_private = false) ⇒ Boolean
9 10 11 |
# File 'lib/active_mongoid/associations/one.rb', line 9 def respond_to?(name, include_private = false) target.respond_to?(name, include_private) || super end |