2006-12-22 06:22:15 +00:00
|
|
|
module Sass::Constant
|
|
|
|
class String
|
|
|
|
def initialize(value)
|
|
|
|
@value = value
|
|
|
|
end
|
|
|
|
|
2006-12-22 10:28:17 +00:00
|
|
|
def to_s(constants={})
|
|
|
|
to_return = @value
|
|
|
|
if @value[0] == Sass::Engine::CONSTANT_CHAR
|
|
|
|
to_return = constants[@value[1..-1]]
|
|
|
|
raise "Undefined constant:\n#{to_return}" unless to_return
|
|
|
|
end
|
|
|
|
to_return
|
2006-12-22 06:22:15 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|