Class: XGen::Mongo::Driver::DBRef
- Inherits:
-
Object
- Object
- XGen::Mongo::Driver::DBRef
- Defined in:
- lib/mongo/types/dbref.rb
Instance Attribute Summary collapse
-
#db ⇒ Object
readonly
Returns the value of attribute db.
-
#field_name ⇒ Object
readonly
Returns the value of attribute field_name.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#object_id ⇒ Object
readonly
Returns the value of attribute object_id.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
Instance Method Summary collapse
-
#initialize(parent, field_name, db, namespace, object_id) ⇒ DBRef
constructor
A new instance of DBRef.
- #to_s ⇒ Object
Constructor Details
#initialize(parent, field_name, db, namespace, object_id) ⇒ DBRef
Returns a new instance of DBRef.
25 26 27 28 |
# File 'lib/mongo/types/dbref.rb', line 25 def initialize(parent, field_name, db, namespace, object_id) @parent, @field_name, @db, @namespace, @object_id = parent, field_name, db, namespace, object_id end |
Instance Attribute Details
#db ⇒ Object (readonly)
Returns the value of attribute db.
23 24 25 |
# File 'lib/mongo/types/dbref.rb', line 23 def db @db end |
#field_name ⇒ Object (readonly)
Returns the value of attribute field_name.
23 24 25 |
# File 'lib/mongo/types/dbref.rb', line 23 def field_name @field_name end |
#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 |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
23 24 25 |
# File 'lib/mongo/types/dbref.rb', line 23 def parent @parent 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 |