Class: Cyrel::AST::MatchNode
- Inherits:
-
ClauseNode
- Object
- Node
- ClauseNode
- Cyrel::AST::MatchNode
- Defined in:
- lib/cyrel/ast/match_node.rb
Overview
AST node for MATCH and OPTIONAL MATCH clauses Because finding things in graphs is what we’re all about
Instance Attribute Summary collapse
-
#optional ⇒ Object
readonly
Returns the value of attribute optional.
-
#path_variable ⇒ Object
readonly
Returns the value of attribute path_variable.
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
Instance Method Summary collapse
-
#initialize(pattern, optional: false, path_variable: nil) ⇒ MatchNode
constructor
A new instance of MatchNode.
Methods inherited from Node
Constructor Details
#initialize(pattern, optional: false, path_variable: nil) ⇒ MatchNode
Returns a new instance of MatchNode.
10 11 12 13 14 |
# File 'lib/cyrel/ast/match_node.rb', line 10 def initialize(pattern, optional: false, path_variable: nil) @pattern = pattern @optional = optional @path_variable = path_variable end |
Instance Attribute Details
#optional ⇒ Object (readonly)
Returns the value of attribute optional.
8 9 10 |
# File 'lib/cyrel/ast/match_node.rb', line 8 def optional @optional end |
#path_variable ⇒ Object (readonly)
Returns the value of attribute path_variable.
8 9 10 |
# File 'lib/cyrel/ast/match_node.rb', line 8 def path_variable @path_variable end |
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
8 9 10 |
# File 'lib/cyrel/ast/match_node.rb', line 8 def pattern @pattern end |