class Sass::CalculationValue::CalculationOperation

@see sass-lang.com/documentation/js-api/classes/calculationoperation/
A binary operation that can appear in a SassCalculation.

def ==(other)

Returns:
  • (::Boolean) -
def ==(other)
  other.is_a?(Sass::CalculationValue::CalculationOperation) &&
    other.operator == operator &&
    other.left == left &&
    other.right == right
end

def hash

Returns:
  • (Integer) -
def hash
  @hash ||= [operator, left, right].hash
end

def initialize(operator, left, right)

Parameters:
  • right (CalculationValue) --
  • left (CalculationValue) --
  • operator (::String) --
def initialize(operator, left, right)
  raise Sass::ScriptError, "Invalid operator: #{operator}" unless OPERATORS.include?(operator)
  @operator = operator.freeze
  @left = assert_calculation_value(left, 'left')
  @right = assert_calculation_value(right, 'right')
end