Class: Refract::AlternationPatternNode

Inherits:
Node
  • Object
show all
Defined in:
lib/refract/nodes/alternation_pattern_node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#accept, #copy, #start_line, #type, type

Constructor Details

#initialize(prism_node: nil, left:, right:) ⇒ AlternationPatternNode

Returns a new instance of AlternationPatternNode.



5
6
7
8
9
10
# File 'lib/refract/nodes/alternation_pattern_node.rb', line 5

def initialize(prism_node: nil, left:, right:)
  @prism_node = prism_node => Prism::Node | nil
  @left = left
  @right = right
  freeze
end

Instance Attribute Details

#leftObject

Returns the value of attribute left.



12
13
14
# File 'lib/refract/nodes/alternation_pattern_node.rb', line 12

def left
  @left
end

#rightObject

Returns the value of attribute right.



12
13
14
# File 'lib/refract/nodes/alternation_pattern_node.rb', line 12

def right
  @right
end