# -- # Copyright (C) 2008-2009 10gen Inc. # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License, version 3, as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License # for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # ++ module XGen module Mongo module Driver class DBRef attr_reader :parent, :field_name, :db, :namespace, :object_id def initialize(parent, field_name, db, namespace, object_id) @parent, @field_name, @db, @namespace, @object_id = parent, field_name, db, namespace, object_id end def to_s "ns: #{namespace}, id: #{object_id}" end end end end end