module Mongoid::Extensions::Hash::ClassMethods
Public Instance Methods
mongoize(object)
click to toggle source
Turn the object from the ruby type we deal with to a Mongo friendly type.
@example Mongoize the object.
Hash.mongoize([ 1, 2, 3 ])
@param [ Object
] object The object to mongoize.
@return [ Hash
] The object mongoized.
@since 3.0.0
# File lib/mongoid/extensions/hash.rb, line 246 def mongoize(object) return if object.nil? evolve(object.dup).update_values { |value| value.mongoize } end
resizable?()
click to toggle source
Can the size of this object change?
@example Is the hash resizable?
{}.resizable?
@return [ true ] true.
@since 3.0.0
# File lib/mongoid/extensions/hash.rb, line 259 def resizable? true end