Class: XGen::Mongo::Driver::DBRef
- Inherits:
-
Object
- Object
- XGen::Mongo::Driver::DBRef
- Defined in:
- lib/mongo/types/dbref.rb
Instance Attribute Summary collapse
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#object_id ⇒ Object
readonly
Returns the value of attribute object_id.
Instance Method Summary collapse
-
#initialize(namespace, object_id) ⇒ DBRef
constructor
A new instance of DBRef.
- #to_s ⇒ Object
Constructor Details
#initialize(namespace, object_id) ⇒ DBRef
Returns a new instance of DBRef.
25 26 27 28 |
# File 'lib/mongo/types/dbref.rb', line 25 def initialize(namespace, object_id) @namespace, @object_id = namespace, object_id end |
Instance Attribute Details
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
23 24 25 |
# File 'lib/mongo/types/dbref.rb', line 23 def namespace @namespace end |
#object_id ⇒ Object (readonly)
Returns the value of attribute object_id.
23 24 25 |
# File 'lib/mongo/types/dbref.rb', line 23 def object_id @object_id end |
Instance Method Details
#to_s ⇒ Object
30 31 32 |
# File 'lib/mongo/types/dbref.rb', line 30 def to_s "ns: #{namespace}, id: #{object_id}" end |