Class: Neo4j::Core::Relationship
- Inherits:
-
Object
- Object
- Neo4j::Core::Relationship
- Includes:
- Wrappable
- Defined in:
- lib/neo4j/core/relationship.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id, type, properties) ⇒ Relationship
constructor
A new instance of Relationship.
Methods included from Wrappable
Constructor Details
#initialize(id, type, properties) ⇒ Relationship
Returns a new instance of Relationship.
8 9 10 11 12 |
# File 'lib/neo4j/core/relationship.rb', line 8 def initialize(id, type, properties) @id = id @type = type.to_sym unless type.nil? @properties = properties end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/neo4j/core/relationship.rb', line 4 def id @id end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
4 5 6 |
# File 'lib/neo4j/core/relationship.rb', line 4 def properties @properties end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/neo4j/core/relationship.rb', line 4 def type @type end |
Class Method Details
.from_url(url, properties = {}) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/neo4j/core/relationship.rb', line 15 def from_url(url, properties = {}) id = url.split('/')[-1].to_i type = nil # unknown properties = properties new(id, type, properties) end |