Method: Neo4j::Cypher::CreatePath#initialize

Defined in:
lib/neo4j-cypher/create.rb

#initialize(clause_list, *args, &cypher_dsl) ⇒ CreatePath

Returns a new instance of CreatePath.



80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/neo4j-cypher/create.rb', line 80

def initialize(clause_list, *args, &cypher_dsl)
  super(clause_list, args.empty? ? :create : :with, EvalContext)

  clause_list.push

  @args = create_clause_args_for(args)
  @arg_list = @args.map { |a| a.return_value }.join(',')
  arg_exec = @args.map(&:eval_context)

  RootClause::EvalContext.new(self).instance_exec(*arg_exec, &cypher_dsl)

  @body = "#{clause_list.to_cypher}"
  clause_list.pop
end