Class: Hash

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_mongo(value) ⇒ Object



70
71
72
# File 'lib/mongo_mapper/extensions.rb', line 70

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

Instance Method Details

#to_mongoObject



74
75
76
# File 'lib/mongo_mapper/extensions.rb', line 74

def to_mongo
  self
end