Class: Sass::ReadOnlyEnvironment
- Inherits:
-
BaseEnvironment
- Object
- BaseEnvironment
- Sass::ReadOnlyEnvironment
- Defined in:
- lib/sass/environment.rb
Overview
A read-only wrapper for a lexical environment for SassScript.
Instance Attribute Summary
Attributes inherited from BaseEnvironment
Instance Method Summary collapse
-
#caller ⇒ ReadOnlyEnvironment
The read-only environment of the caller of this environment's mixin or function.
-
#content ⇒ ReadOnlyEnvironment
The read-only content passed to this environment.
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 Method Details
#caller ⇒ ReadOnlyEnvironment
The read-only environment of the caller of this environment's mixin or function.
175 176 177 178 179 |
# File 'lib/sass/environment.rb', line 175
def caller
return @caller if @caller
env = super
@caller ||= env.is_a?(ReadOnlyEnvironment) ? env : ReadOnlyEnvironment.new(env, env.options)
end
|
#content ⇒ ReadOnlyEnvironment
The read-only content passed to this environment.
185 186 187 188 189 |
# File 'lib/sass/environment.rb', line 185
def content
return @content if @content
env = super
@content ||= env.is_a?(ReadOnlyEnvironment) ? env : ReadOnlyEnvironment.new(env, env.options)
end
|