Class: Bool::And
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) ⇒ And
constructor
A new instance of And.
Constructor Details
#initialize(token, left, right) ⇒ And
Returns a new instance of And.
30 31 32 33 |
# File 'lib/bool/ast.rb', line 30 def initialize(token, left, right) super(token) @left, @right = left, right end |
Instance Attribute Details
#left ⇒ Object (readonly)
Returns the value of attribute left.
28 29 30 |
# File 'lib/bool/ast.rb', line 28 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
28 29 30 |
# File 'lib/bool/ast.rb', line 28 def right @right end |
Instance Method Details
#accept(visitor, arg) ⇒ Object
35 36 37 |
# File 'lib/bool/ast.rb', line 35 def accept(visitor, arg) visitor.visit_and(self, arg) end |