Class: Cyrel::AST::MatchNode

Inherits:
ClauseNode show all
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

Instance Method Summary collapse

Methods inherited from Node

#==, #accept

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

#optionalObject (readonly)

Returns the value of attribute optional.



8
9
10
# File 'lib/cyrel/ast/match_node.rb', line 8

def optional
  @optional
end

#path_variableObject (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

#patternObject (readonly)

Returns the value of attribute pattern.



8
9
10
# File 'lib/cyrel/ast/match_node.rb', line 8

def pattern
  @pattern
end