Class: CSS::SAC::LexicalURI
Instance Attribute Summary
Attributes inherited from LexicalUnit
#dimension_unit_text, #float_value, #function_name, #integer_value, #lexical_unit_type, #parameters, #string_value
Instance Method Summary
collapse
Methods inherited from LexicalUnit
#eql?
Constructor Details
#initialize(value) ⇒ LexicalURI
Returns a new instance of LexicalURI.
114
115
116
117
|
# File 'lib/css/sac/lexical_unit.rb', line 114
def initialize(value)
self.string_value = value.gsub(/^url\(/, '').gsub(/\)$/, '')
self.lexical_unit_type = :SAC_URI
end
|
Instance Method Details
#==(other) ⇒ Object
119
120
121
|
# File 'lib/css/sac/lexical_unit.rb', line 119
def ==(other)
super && self.string_value == other.string_value
end
|
#hash ⇒ Object
123
124
125
|
# File 'lib/css/sac/lexical_unit.rb', line 123
def hash
self.string_value.hash
end
|
#to_s ⇒ Object
127
128
129
|
# File 'lib/css/sac/lexical_unit.rb', line 127
def to_s
"url(#{string_value})"
end
|