Class: Hash

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_mongo(value) ⇒ Object



63
64
65
# File 'lib/mongomapper/support.rb', line 63

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

Instance Method Details

#to_mongoObject



67
68
69
# File 'lib/mongomapper/support.rb', line 67

def to_mongo
  self
end