Class: Neo4j::Driver::Types::UnboundRelationship
- Inherits:
-
Object
- Object
- Neo4j::Driver::Types::UnboundRelationship
- Defined in:
- lib/neo4j/driver/types/unbound_relationship.rb
Overview
Represents an unbound relationship (used in paths before binding to nodes)
Instance Attribute Summary collapse
-
#element_id ⇒ Object
readonly
Returns the value of attribute element_id.
-
#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.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#bind(start_node_id, end_node_id, start_node_element_id = nil, end_node_element_id = nil) ⇒ Object
Bind this relationship to specific start and end nodes.
-
#initialize(id, type, properties, element_id = nil) ⇒ UnboundRelationship
constructor
A new instance of UnboundRelationship.
Constructor Details
#initialize(id, type, properties, element_id = nil) ⇒ UnboundRelationship
Returns a new instance of UnboundRelationship.
10 11 12 13 14 15 |
# File 'lib/neo4j/driver/types/unbound_relationship.rb', line 10 def initialize(id, type, properties, element_id = nil) @id = id @type = type @properties = properties @element_id = element_id || id.to_s end |
Instance Attribute Details
#element_id ⇒ Object (readonly)
Returns the value of attribute element_id.
8 9 10 |
# File 'lib/neo4j/driver/types/unbound_relationship.rb', line 8 def element_id @element_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/neo4j/driver/types/unbound_relationship.rb', line 8 def id @id end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
8 9 10 |
# File 'lib/neo4j/driver/types/unbound_relationship.rb', line 8 def properties @properties end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/neo4j/driver/types/unbound_relationship.rb', line 8 def type @type end |
Instance Method Details
#[](key) ⇒ Object
17 18 19 |
# File 'lib/neo4j/driver/types/unbound_relationship.rb', line 17 def [](key) @properties[key.to_s] || @properties[key.to_sym] end |
#bind(start_node_id, end_node_id, start_node_element_id = nil, end_node_element_id = nil) ⇒ Object
Bind this relationship to specific start and end nodes
22 23 24 25 |
# File 'lib/neo4j/driver/types/unbound_relationship.rb', line 22 def bind(start_node_id, end_node_id, start_node_element_id = nil, end_node_element_id = nil) Relationship.new(@id, start_node_id, end_node_id, @type, @properties, @element_id, start_node_element_id, end_node_element_id) end |