Class: Refract::OrNode
Instance Attribute Summary collapse
-
#left ⇒ Object
Returns the value of attribute left.
-
#operator ⇒ Object
Returns the value of attribute operator.
-
#right ⇒ Object
Returns the value of attribute right.
Instance Method Summary collapse
-
#initialize(prism_node: nil, left:, operator:, right:) ⇒ OrNode
constructor
A new instance of OrNode.
Methods inherited from Node
#accept, #copy, #start_line, #type, type
Constructor Details
#initialize(prism_node: nil, left:, operator:, right:) ⇒ OrNode
Returns a new instance of OrNode.
5 6 7 8 9 10 11 |
# File 'lib/refract/nodes/or_node.rb', line 5 def initialize(prism_node: nil, left:, operator:, right:) @prism_node = prism_node => Prism::Node | nil @left = left @operator = operator @right = right freeze end |
Instance Attribute Details
#left ⇒ Object
Returns the value of attribute left.
13 14 15 |
# File 'lib/refract/nodes/or_node.rb', line 13 def left @left end |
#operator ⇒ Object
Returns the value of attribute operator.
13 14 15 |
# File 'lib/refract/nodes/or_node.rb', line 13 def operator @operator end |
#right ⇒ Object
Returns the value of attribute right.
13 14 15 |
# File 'lib/refract/nodes/or_node.rb', line 13 def right @right end |