Class: Bool::Or
Instance Attribute Summary collapse
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
Attributes inherited from Node
Instance Method Summary collapse
- #accept(visitor, arg) ⇒ Object
-
#initialize(token, left, right) ⇒ Or
constructor
A new instance of Or.
Constructor Details
#initialize(token, left, right) ⇒ Or
Returns a new instance of Or.
43 44 45 46 |
# File 'lib/bool/ast.rb', line 43 def initialize(token, left, right) super(token) @left, @right = left, right end |
Instance Attribute Details
#left ⇒ Object (readonly)
Returns the value of attribute left.
41 42 43 |
# File 'lib/bool/ast.rb', line 41 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
41 42 43 |
# File 'lib/bool/ast.rb', line 41 def right @right end |
Instance Method Details
#accept(visitor, arg) ⇒ Object
48 49 50 |
# File 'lib/bool/ast.rb', line 48 def accept(visitor, arg) visitor.visit_or(self, arg) end |