Class: Refract::AlternationPatternNode
- Defined in:
- lib/refract/nodes/alternation_pattern_node.rb
Instance Attribute Summary collapse
-
#left ⇒ Object
Returns the value of attribute left.
-
#right ⇒ Object
Returns the value of attribute right.
Instance Method Summary collapse
-
#initialize(prism_node: nil, left:, right:) ⇒ AlternationPatternNode
constructor
A new instance of AlternationPatternNode.
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
#left ⇒ Object
Returns the value of attribute left.
12 13 14 |
# File 'lib/refract/nodes/alternation_pattern_node.rb', line 12 def left @left end |
#right ⇒ Object
Returns the value of attribute right.
12 13 14 |
# File 'lib/refract/nodes/alternation_pattern_node.rb', line 12 def right @right end |