Class: Sass::ReadOnlyEnvironment

Inherits:
BaseEnvironment show all
Defined in:
lib/sass/environment.rb

Overview

A read-only wrapper for a lexical environment for SassScript.

Instance Attribute Summary

Attributes inherited from BaseEnvironment

#options, #selector

Instance Method Summary collapse

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

#callerReadOnlyEnvironment

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

#contentReadOnlyEnvironment

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