Class: Sass::Environment
- Inherits:
- BaseEnvironment
- Object
- BaseEnvironment
- Sass::Environment
- Defined in:
- /Users/ceppstei/Projects/sass-lang/.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
Instance Attribute Summary (collapse)
- - (Environment) parent readonly
The enclosing environment, or nil if this is the global environment.
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.
161 162 163 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/environment.rb', line 161
def parent
@parent
end |