class Sass::Script::Variable

A SassScript parse node representing a variable.

def _perform(environment)

Raises:
  • (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

Other tags:
    See: Node#children -

Returns:
  • (Array) - empty
def children
  []
end

def initialize(name)

Parameters:
  • name (String) -- See \{#name}
def initialize(name)
  @name = name
  super()
end

def inspect(opts = {})

Returns:
  • (String) - A string representation of the variable
def inspect(opts = {})
  return "!important" if name == "important"
  "$#{dasherize(name, opts)}"
end