1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00
haml--haml/lib/sass/script/variable.rb
2008-10-15 20:22:01 -07:00

20 lines
369 B
Ruby

module Sass
module Script
class Variable # :nodoc:
attr_reader :name
def initialize(name)
@name = name
end
def inspect
"!#{name}"
end
def perform(environment)
(val = environment.var(name)) && (return val)
raise SyntaxError.new("Undefined variable: \"!#{name}\".")
end
end
end
end