Method: MongoDoc::BSON.decode
- Defined in:
- lib/mongodoc/bson.rb
.decode(bson, options = {}) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/mongodoc/bson.rb', line 21 def self.decode(bson, = {}) return bson if [:raw_json] case bson when Hash bson_create(bson, ) when Array array_create(bson, ) else bson end end |