Module: Mongo::DBRef::ClassMethods
- Defined in:
- lib/mongo/dbref.rb
Overview
Instance Method Summary collapse
-
#from_bson(buffer) ⇒ Hash, DBRef
Deserialize the hash from BSON, converting to a DBRef if appropriate.
Instance Method Details
#from_bson(buffer) ⇒ Hash, DBRef
Deserialize the hash from BSON, converting to a DBRef if appropriate.
102 103 104 105 106 107 108 |
# File 'lib/mongo/dbref.rb', line 102 def from_bson(buffer) decoded = super if ref = decoded[COLLECTION] decoded = DBRef.new(ref, decoded[ID], decoded[DATABASE]) end decoded end |