Class: Hash

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_mongo(value) ⇒ Object



71
72
73
# File 'lib/novelys_mongo_mapper/support.rb', line 71

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

Instance Method Details

#to_mongoObject



75
76
77
# File 'lib/novelys_mongo_mapper/support.rb', line 75

def to_mongo
  self
end