Class: Neo4j::Driver::Types::UnboundRelationship

Inherits:
Entity
  • Object
show all
Defined in:
lib/neo4j/driver/types/unbound_relationship.rb

Overview

Represents an unbound relationship (used in paths before binding to nodes). An Entity with a type but no start/end nodes yet.

Instance Attribute Summary collapse

Attributes inherited from Entity

#element_id, #id, #properties

Instance Method Summary collapse

Methods inherited from Entity

#==, #[], #hash

Constructor Details

#initialize(id, type, properties, element_id = nil) ⇒ UnboundRelationship

Returns a new instance of UnboundRelationship.



11
12
13
14
# File 'lib/neo4j/driver/types/unbound_relationship.rb', line 11

def initialize(id, type, properties, element_id = nil)
  super(id, properties, element_id)
  @type = type
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



9
10
11
# File 'lib/neo4j/driver/types/unbound_relationship.rb', line 9

def type
  @type
end

Instance Method Details

#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



17
18
19
20
# File 'lib/neo4j/driver/types/unbound_relationship.rb', line 17

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