lib/mongo/dbref.rb
# Deserialize the hash from BSON, converting to a DBRef if appropriate.
#
# @param [ String ] buffer The bson representing a hash.
#
# @return [ Hash, DBRef ] The decoded hash or DBRef.
#
# @see http://bsonspec.org/#/specification
#
# @since 2.0.0
Deserialize the hash from BSON, converting to a DBRef if appropriate.
Deserialize the hash from BSON converting to a DBRef if appropriate .
def from_bson(buffer, **options)
        decoded = if options.empty?
          super(buffer)
        else
          super
        end
        if ref = decoded[COLLECTION]
          decoded = DBRef.new(ref, decoded[ID], decoded[DATABASE])
        end
        decoded
      end
def from_bson ( buffer , ** options ) decoded = if options . empty? super ( buffer ) else super end if ref = decoded [ COLLECTION ] decoded = DBRef . new ( ref , decoded [ ID ] , decoded [ DATABASE ] ) end decoded end
Deserialize the hash from BSON, converting to a DBRef if appropriate.
Deserialize the hash from BSON converting to a DBRef if appropriate .
# bson-ruby 4.8.0 changes #from_bson API to take **options. # However older bsons fail if invoked with a plain super here, # even if options are empty.
The decoded hash or DBRef.
The decoded hash or DBRef .
 Hash, DBRef 
buffer
options
buffer The bson representing a hash.
buffer The bson representing a hash .
see
None
since
None