class Sass::Script::Variable
A SassScript parse node representing a variable.
def initialize(name)
-
name(String) -- See \{#name}
def initialize(name) @name = name end
def inspect
-
(String)- A string representation of the variable
def inspect "!#{name}" end
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) (val = environment.var(name)) && (return val) raise SyntaxError.new("Undefined variable: \"!#{name}\".") end