class Sass::Script::Variable
A SassScript parse node representing a variable.
def _perform(environment)
-
(Sass::SyntaxError)
- if the variable is undefined
Returns:
-
(Literal)
- The SassScript object that is the value of the variable
Parameters:
-
environment
(Sass::Environment
) -- The environment in which to evaluate the SassScript
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
def children
- See: Node#children -
Returns:
-
(Array
- empty)
def children [] end
def initialize(name)
-
name
(String
) -- See \{#name}
def initialize(name) @name = name super() end
def inspect(opts = {})
-
(String)
- A string representation of the variable
def inspect(opts = {}) return "!important" if name == "important" "$#{dasherize(name, opts)}" end