Class: Sass::Environment

Inherits:
BaseEnvironment show all
Defined in:
/home/nweiz/code/sass-site/.sass/lib/sass/environment.rb

Overview

The lexical environment for SassScript. This keeps track of variable, mixin, and function definitions.

A new environment is created for each level of Sass nesting. This allows variables to be lexically scoped. The new environment refers to the environment in the upper scope, so it has access to variables defined in enclosing scopes, but new variables are defined locally.

Environment also keeps track of the Engine options so that they can be made available to Script::Functions.

Direct Known Subclasses

SemiGlobalEnvironment

Instance Attribute Summary (collapse)

Attributes inherited from BaseEnvironment

#caller, #content, #options, #selector

Method Summary

Methods inherited from BaseEnvironment

#global?, #global_env, inherited_hash_accessor, inherited_hash_reader, inherited_hash_writer, #initialize, #stack

Constructor Details

This class inherits a constructor from Sass::BaseEnvironment

Instance Attribute Details

- (Environment) parent (readonly)

The enclosing environment, or nil if this is the global environment.

Returns:



161
162
163
# File '/home/nweiz/code/sass-site/.sass/lib/sass/environment.rb', line 161

def parent
  @parent
end