Class: CypherBuilder::Cypher

Inherits:
Object
  • Object
show all
Includes:
Resolver
Defined in:
lib/cypher_builder/cypher.rb

Instance Method Summary collapse

Methods included from Resolver

#resolve, #wrap

Constructor Details

#initialize(*parts) ⇒ Cypher

Returns a new instance of Cypher.



11
12
13
# File 'lib/cypher_builder/cypher.rb', line 11

def initialize(*parts)
  @parts = wrap(*parts)
end

Instance Method Details

#as_cypher(payload:, context:) ⇒ Object



15
16
17
# File 'lib/cypher_builder/cypher.rb', line 15

def as_cypher(payload:, context:)
  resolve(@parts, payload: payload, context: context.add(self))
end