Module: Mongoid::Extensions::Hash::ClassMethods
- Defined in:
- lib/mongoid/extensions/hash.rb
Instance Method Summary collapse
-
#mongoize(object) ⇒ Hash
Turn the object from the ruby type we deal with to a Mongo friendly type.
-
#resizable? ⇒ true
Can the size of this object change?.
Instance Method Details
#mongoize(object) ⇒ Hash
Turn the object from the ruby type we deal with to a Mongo friendly type.
221 222 223 224 |
# File 'lib/mongoid/extensions/hash.rb', line 221 def mongoize(object) return if object.nil? evolve(object.dup).update_values { |value| value.mongoize } end |
#resizable? ⇒ true
Can the size of this object change?
232 233 234 |
# File 'lib/mongoid/extensions/hash.rb', line 232 def resizable? true end |