Class: CSS::SAC::LexicalString

Inherits:
LexicalUnit show all
Defined in:
lib/css/sac/lexical_unit.rb

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) ⇒ LexicalString

Returns a new instance of LexicalString.



84
85
86
87
# File 'lib/css/sac/lexical_unit.rb', line 84

def initialize(value)
  self.string_value = value
  self.lexical_unit_type = :SAC_STRING_VALUE
end

Instance Method Details

#==(other) ⇒ Object



89
90
91
# File 'lib/css/sac/lexical_unit.rb', line 89

def ==(other)
  super && self.string_value == other.string_value
end

#hashObject



93
94
95
# File 'lib/css/sac/lexical_unit.rb', line 93

def hash
  self.string_value.hash
end