Method: Sass::Script::Value::Color#eq

Defined in:
lib/sass/script/value/color.rb

#eq(other) ⇒ Bool

The SassScript == operation. Note that this returns a Bool object, not a Ruby boolean.

Parameters:

  • other (Value)

    The right-hand side of the operator

Returns:

  • (Bool)

    True if this value is the same as the other, false otherwise



398
399
400
401
# File 'lib/sass/script/value/color.rb', line 398

def eq(other)
  Sass::Script::Value::Bool.new(
    other.is_a?(Color) && rgb == other.rgb && alpha == other.alpha)
end