Class: Neo4j::Core::Cypher::StartNode
- Inherits:
-
Start
- Object
- Expression
- Start
- Neo4j::Core::Cypher::StartNode
- Defined in:
- lib/neo4j-core/cypher/cypher.rb
Overview
Can be created from a node
dsl method.
Instance Attribute Summary collapse
- #nodes ⇒ Object readonly
Attributes inherited from Start
Attributes included from Variable
Attributes inherited from Expression
#clause, #expressions, #separator
Instance Method Summary collapse
-
#initialize(nodes, expressions) ⇒ StartNode
constructor
A new instance of StartNode.
- #to_s ⇒ Object
Methods included from Matchable
#-, #<, #<<, #<=>, #>, #>>, #both, #incoming, #outgoing, #where, #where_not
Methods included from Variable
#[], #as, #count, #distinct, #exist?, #is_a?, #neo_id, #property?
Methods inherited from Expression
#insert_last, #prefix, #prefixes, #prev_clause, #valid?
Constructor Details
#initialize(nodes, expressions) ⇒ StartNode
Returns a new instance of StartNode.
375 376 377 378 379 |
# File 'lib/neo4j-core/cypher/cypher.rb', line 375 def initialize(nodes, expressions) super("n", expressions) @nodes = nodes.map { |n| n.respond_to?(:neo_id) ? n.neo_id : n } end |
Instance Attribute Details
#nodes ⇒ Object (readonly)
373 374 375 |
# File 'lib/neo4j-core/cypher/cypher.rb', line 373 def nodes @nodes end |
Instance Method Details
#to_s ⇒ Object
381 382 383 |
# File 'lib/neo4j-core/cypher/cypher.rb', line 381 def to_s "#{var_name}=node(#{nodes.join(',')})" end |