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
#deprecated_false_warning_given, #global_warning_given, #options, #selector
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_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.
179 180 181 182 183 |
# File 'lib/sass/environment.rb', line 179
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.
189 190 191 192 193 |
# File 'lib/sass/environment.rb', line 189
def content
return @content if @content
env = super
@content ||= env.is_a?(ReadOnlyEnvironment) ? env : ReadOnlyEnvironment.new(env, env.options)
end
|