Class: FilterParam::AST::Expressions::BinaryExpression

Inherits:
Expression
  • Object
show all
Defined in:
lib/filter_param/ast/expressions.rb

Instance Attribute Summary collapse

Attributes inherited from Expression

#operands, #operator

Instance Method Summary collapse

Methods inherited from Node

#accept

Constructor Details

#initialize(operator, left_operand, right_operand) ⇒ BinaryExpression

Returns a new instance of BinaryExpression.



28
29
30
31
32
33
# File 'lib/filter_param/ast/expressions.rb', line 28

def initialize(operator, left_operand, right_operand)
  super(operator, left_operand, right_operand)

  @left_operand = left_operand
  @right_operand = right_operand
end

Instance Attribute Details

#left_operandObject (readonly)

Returns the value of attribute left_operand.



26
27
28
# File 'lib/filter_param/ast/expressions.rb', line 26

def left_operand
  @left_operand
end

#right_operandObject (readonly)

Returns the value of attribute right_operand.



26
27
28
# File 'lib/filter_param/ast/expressions.rb', line 26

def right_operand
  @right_operand
end