class Neo4j::Cypher::With

Attributes

arg_list[R]

Public Class Methods

new(clause_list, where_or_match, *args, &cypher_dsl) click to toggle source
Calls superclass method Neo4j::Cypher::Clause::new
   # File lib/neo4j-cypher/with.rb
 8 def initialize(clause_list, where_or_match, *args, &cypher_dsl)
 9   super(clause_list, :with, EvalContext)
10 
11   clause_list.push
12 
13   @args = create_clause_args_for(args)
14   @arg_list = @args.map { |a| a.return_value }.join(',')
15   arg_exec = @args.map(&:eval_context)
16 
17   RootClause::EvalContext.new(self).instance_exec(*arg_exec, &cypher_dsl)
18   @body = "#{where_or_match.to_s.upcase} #{clause_list.to_cypher}"
19   clause_list.pop
20 end

Public Instance Methods

to_cypher() click to toggle source
   # File lib/neo4j-cypher/with.rb
22 def to_cypher
23   @body ? "#{@arg_list} #{@body}" : @arg_list
24 end