Object
A reference to another object in a MongoDB database.
Create a DBRef. Use this class in conjunction with DB#dereference.
@param [String] namespace a collection name. @param [ObjectId] object_id an object id.
# File lib/bson/types/dbref.rb, line 26 def initialize(namespace, object_id) @namespace = namespace @object_id = object_id end
# File lib/bson/types/dbref.rb, line 35 def to_hash {"$ns" => @namespace, "$id" => @object_id } end
# File lib/bson/types/dbref.rb, line 31 def to_s "ns: #{namespace}, id: #{object_id}" end
[Validate]
Generated with the Darkfish Rdoc Generator 2.