Class: CypherBuilder::Match
- Inherits:
-
Object
- Object
- CypherBuilder::Match
- Includes:
- Resolver
- Defined in:
- lib/cypher_builder/match.rb
Instance Method Summary collapse
- #as_cypher(payload:, context:) ⇒ Object
-
#initialize(*parts) ⇒ Match
constructor
A new instance of Match.
Methods included from Resolver
Constructor Details
#initialize(*parts) ⇒ Match
Returns a new instance of Match.
9 10 11 |
# File 'lib/cypher_builder/match.rb', line 9 def initialize(*parts) @parts = wrap(*parts) end |
Instance Method Details
#as_cypher(payload:, context:) ⇒ Object
13 14 15 |
# File 'lib/cypher_builder/match.rb', line 13 def as_cypher(payload:, context: ) 'MATCH ' + resolve(@parts, separator: ', ', payload: payload, context: context.add(self)) end |