Class: CssCompare::CSS::Value::Url

Inherits:
Base
  • Object
show all
Defined in:
lib/css_compare/css/value/url.rb

Overview

Wraps the SassScript ‘url` Funcall.

Instance Attribute Summary

Attributes inherited from Base

#value

Instance Method Summary collapse

Methods inherited from Base

#color?, #equals?, #important?, #initialize, #to_s

Constructor Details

This class inherits a constructor from CssCompare::CSS::Value::Base

Instance Method Details

#==(other) ⇒ Boolean

Checks, whether two url calls are equal.

Parameters:

  • other (Url)

    the other url call

Returns:

  • (Boolean)


11
12
13
14
15
16
# File 'lib/css_compare/css/value/url.rb', line 11

def ==(other)
  return false unless super
  value1 = sanitize_url(@value.args[0].value.value)
  value2 = sanitize_url(other.value.args[0].value.value)
  value1 == value2
end