Class: CypherBuilder::Param
- Inherits:
-
Object
- Object
- CypherBuilder::Param
- Defined in:
- lib/cypher_builder/param.rb
Instance Method Summary collapse
- #as_cypher(payload:) ⇒ Object
-
#initialize(name) ⇒ Param
constructor
A new instance of Param.
Constructor Details
#initialize(name) ⇒ Param
Returns a new instance of Param.
7 8 9 |
# File 'lib/cypher_builder/param.rb', line 7 def initialize(name) @name = name end |
Instance Method Details
#as_cypher(payload:) ⇒ Object
11 12 13 14 |
# File 'lib/cypher_builder/param.rb', line 11 def as_cypher(payload:) payload.will_be_used(@name) sprintf('{%s}', @name) end |