Class: Aspen::CustomStatement
- Inherits:
-
AbstractStatement
- Object
- AbstractStatement
- Aspen::CustomStatement
- Defined in:
- lib/aspen/custom_statement.rb
Instance Attribute Summary collapse
-
#nodes ⇒ Object
readonly
Returns the value of attribute nodes.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(nodes:, cypher:) ⇒ CustomStatement
constructor
A new instance of CustomStatement.
- #signature ⇒ Object
- #to_cypher ⇒ Object
Constructor Details
#initialize(nodes:, cypher:) ⇒ CustomStatement
TODO:
The inclusion of the Cypher parameter suggests that there might be a better way to generate the Cypher from a custom statement. Not sure.
Returns a new instance of CustomStatement.
26 27 28 29 |
# File 'lib/aspen/custom_statement.rb', line 26 def initialize(nodes: , cypher: ) @nodes = nodes @cypher = cypher end |
Instance Attribute Details
#nodes ⇒ Object (readonly)
Returns the value of attribute nodes.
8 9 10 |
# File 'lib/aspen/custom_statement.rb', line 8 def nodes @nodes end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/aspen/custom_statement.rb', line 8 def type @type end |
Instance Method Details
#signature ⇒ Object
TODO:
The signature of the custom statement should be the Cypher template for that statement.
16 17 18 |
# File 'lib/aspen/custom_statement.rb', line 16 def signature "custom" end |
#to_cypher ⇒ Object
31 32 33 |
# File 'lib/aspen/custom_statement.rb', line 31 def to_cypher @cypher end |