Class: Hash

Inherits:
Object show all
Defined in:
lib/mongo_doc/ext/hash.rb

Instance Method Summary collapse

Instance Method Details

#to_bson(*args) ⇒ Object



2
3
4
5
6
# File 'lib/mongo_doc/ext/hash.rb', line 2

def to_bson(*args)
  {}.tap do |hash|
    each {|key, value| hash[key.to_s] = value.to_bson}
  end
end