Class: Archsight::Query::AST::BinaryOp
- Defined in:
- lib/archsight/query/ast.rb
Overview
Binary logical operation (AND, OR)
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(operator, left, right) ⇒ BinaryOp
constructor
A new instance of BinaryOp.
Constructor Details
#initialize(operator, left, right) ⇒ BinaryOp
Returns a new instance of BinaryOp.
30 31 32 33 34 |
# File 'lib/archsight/query/ast.rb', line 30 def initialize(operator, left, right) @operator = operator # :and, :or @left = left @right = right end |
Instance Attribute Details
#left ⇒ Object (readonly)
Returns the value of attribute left.
28 29 30 |
# File 'lib/archsight/query/ast.rb', line 28 def left @left end |
#operator ⇒ Object (readonly)
Returns the value of attribute operator.
28 29 30 |
# File 'lib/archsight/query/ast.rb', line 28 def operator @operator end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
28 29 30 |
# File 'lib/archsight/query/ast.rb', line 28 def right @right end |
Instance Method Details
#accept(visitor) ⇒ Object
36 37 38 |
# File 'lib/archsight/query/ast.rb', line 36 def accept(visitor) visitor.visit_binary_op(self) end |