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) ⇒ Hash
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.
31 32 33 |
# File 'lib/mongoid/extensions/set.rb', line 31 def demongoize(object) ::Set.new(object) end |
#mongoize(object) ⇒ Hash
Turn the object from the ruby type we deal with to a Mongo friendly type.
46 47 48 |
# File 'lib/mongoid/extensions/set.rb', line 46 def mongoize(object) object.to_a end |