Class: Baba::Expr::Logical
- Inherits:
-
Object
- Object
- Baba::Expr::Logical
- Defined in:
- lib/baba/expr.rb
Instance Attribute Summary collapse
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#operator ⇒ Object
readonly
Returns the value of attribute operator.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(left, operator, right) ⇒ Logical
constructor
A new instance of Logical.
Constructor Details
#initialize(left, operator, right) ⇒ Logical
Returns a new instance of Logical.
90 91 92 |
# File 'lib/baba/expr.rb', line 90 def initialize(left, operator, right) @left = left; @operator = operator; @right = right end |
Instance Attribute Details
#left ⇒ Object (readonly)
Returns the value of attribute left.
88 89 90 |
# File 'lib/baba/expr.rb', line 88 def left @left end |
#operator ⇒ Object (readonly)
Returns the value of attribute operator.
88 89 90 |
# File 'lib/baba/expr.rb', line 88 def operator @operator end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
88 89 90 |
# File 'lib/baba/expr.rb', line 88 def right @right end |
Instance Method Details
#accept(visitor) ⇒ Object
[View source]
94 95 96 |
# File 'lib/baba/expr.rb', line 94 def accept(visitor) visitor.visit_logical_expr(self) end |