Class: Sass::ReadOnlyEnvironment

Inherits:
BaseEnvironment show all
Defined in:
/Users/ceppstei/Projects/sass-lang/.sass/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

- (ReadOnlyEnvironment) caller

The read-only environment of the caller of this environment’s mixin or function.



182
183
184
185
186
# File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/environment.rb', line 182

def caller
  return @caller if @caller
  env = super
  @caller ||= env.is_a?(ReadOnlyEnvironment) ? env : ReadOnlyEnvironment.new(env, env.options)
end

- (ReadOnlyEnvironment) content

The read-only content passed to this environment.



192
193
194
195
196
# File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/environment.rb', line 192

def content
  return @content if @content
  env = super
  @content ||= env.is_a?(ReadOnlyEnvironment) ? env : ReadOnlyEnvironment.new(env, env.options)
end