Class: Mongo::DBRef
- Inherits:
-
Object
- Object
- Mongo::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.
23 24 25 26 |
# File 'lib/mongo/types/dbref.rb', line 23 def initialize(namespace, object_id) @namespace, @object_id = namespace, object_id end |
Instance Attribute Details
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
21 22 23 |
# File 'lib/mongo/types/dbref.rb', line 21 def namespace @namespace end |
#object_id ⇒ Object (readonly)
Returns the value of attribute object_id.
21 22 23 |
# File 'lib/mongo/types/dbref.rb', line 21 def object_id @object_id end |
Instance Method Details
#to_s ⇒ Object
28 29 30 |
# File 'lib/mongo/types/dbref.rb', line 28 def to_s "ns: #{namespace}, id: #{object_id}" end |