class Sass::Script::Value::Number

def eq(other)

Returns:
  • (Boolean) - Whether this number is equal to the other object

Parameters:
  • other (Value) -- The right-hand side of the operator
def eq(other)
  return Bool::FALSE unless other.is_a?(Sass::Script::Value::Number)
  this = self
  begin
    if unitless?
      this = this.coerce(other.numerator_units, other.denominator_units)
    else
      other = other.coerce(@numerator_units, @denominator_units)
    end
  rescue Sass::UnitConversionError
    return Bool::FALSE
  end
  Bool.new(basically_equal?(this.value, other.value))
end