Method: BSON#serialize_dbref_element

Defined in:
lib/mongo/util/bson.rb

#serialize_dbref_element(buf, key, val) ⇒ Object



352
353
354
355
356
357
# File 'lib/mongo/util/bson.rb', line 352

def serialize_dbref_element(buf, key, val)
  oh = OrderedHash.new
  oh['$ref'] = val.namespace
  oh['$id'] = val.object_id
  serialize_object_element(buf, key, oh, false)
end