Module: Mongoid::Extensions::Set::ClassMethods
- Defined in:
- lib/mongoid/extensions/set.rb
Instance Method Summary collapse
-
#demongoize(object) ⇒ Set
Convert the object from its mongo friendly ruby type to this type.
-
#mongoize(object) ⇒ Array
Turn the object from the ruby type we deal with to a Mongo friendly type.
Instance Method Details
#demongoize(object) ⇒ Set
Convert the object from its mongo friendly ruby type to this type.
28 29 30 |
# File 'lib/mongoid/extensions/set.rb', line 28 def demongoize(object) ::Set.new(object) end |
#mongoize(object) ⇒ Array
Turn the object from the ruby type we deal with to a Mongo friendly type.
41 42 43 |
# File 'lib/mongoid/extensions/set.rb', line 41 def mongoize(object) object.to_a end |