Method: Sass::Script::Variable#perform

Defined in:
lib/sass/script/variable.rb

#perform(environment) ⇒ Literal

Evaluates the variable.

Parameters:

  • environment (Sass::Environment)

    The environment in which to evaluate the SassScript

Returns:

  • (Literal)

    The SassScript object that is the value of the variable

Raises:



25
26
27
28
# File 'lib/sass/script/variable.rb', line 25

def perform(environment)
  (val = environment.var(name)) && (return val)
  raise SyntaxError.new("Undefined variable: \"!#{name}\".")
end