A SassScript parse node representing a variable.
Returns an empty array.
@return [Array<Node>] empty @see Node#children
# File lib/sass/script/variable.rb, line 33 def children [] end
@see Node#deep_copy
# File lib/sass/script/variable.rb, line 38 def deep_copy dup end
@return [String] A string representation of the variable
# File lib/sass/script/variable.rb, line 23 def inspect(opts = {}) return "!important" if name == "important" "$#{dasherize(name, opts)}" end
Evaluates the variable.
@param environment [Sass::Environment] The environment in which to evaluate the SassScript @return [Literal] The SassScript object that is the value of the variable @raise [Sass::SyntaxError] if the variable is undefined
# File lib/sass/script/variable.rb, line 49 def _perform(environment) raise SyntaxError.new("Undefined variable: \"$#{name}\".") unless val = environment.var(name) if val.is_a?(Number) val = val.dup val.original = nil end return val end
Generated with the Darkfish Rdoc Generator 2.