Module: Mongoid::Extensions::Nil::Assimilation
- Included in:
- NilClass
- Defined in:
- lib/mongoid/extensions/nil/assimilation.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#assimilate(parent, options, type = nil) ⇒ Object
Will remove the child object from the parent.
- #collectionize ⇒ Object
Instance Method Details
#assimilate(parent, options, type = nil) ⇒ Object
Will remove the child object from the parent.
7 8 9 |
# File 'lib/mongoid/extensions/nil/assimilation.rb', line 7 def assimilate(parent, , type = nil) parent.remove_attribute(.name); self end |
#collectionize ⇒ Object
11 12 13 |
# File 'lib/mongoid/extensions/nil/assimilation.rb', line 11 def collectionize to_s.collectionize end |