Class: Hash

Inherits:
Object show all
Defined in:
lib/mongo_mapper/support.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_mongo(value) ⇒ Object



62
63
64
# File 'lib/mongo_mapper/support.rb', line 62

def self.from_mongo(value)
  HashWithIndifferentAccess.new(value || {})
end

Instance Method Details

#to_mongoObject



66
67
68
# File 'lib/mongo_mapper/support.rb', line 66

def to_mongo
  self
end