class Sass::ReadOnlyEnvironment

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

def caller

Returns:
  • (ReadOnlyEnvironment) -

Other tags:
    See: BaseEnvironment#caller -
def caller
  return @caller if @caller
  env = super
  @caller ||= env.is_a?(ReadOnlyEnvironment) ? env : ReadOnlyEnvironment.new(env, env.options)
end

def content

Returns:
  • ([Array, ReadOnlyEnvironment]?) - The content nodes and

Other tags:
    See: BaseEnvironment#content -
def content
  # Return the cached content from a previous invocation if any
  return @content if @content_cached
  # get the content with a read-write environment from the superclass
  read_write_content = super
  if read_write_content
    tree, env = read_write_content
    # make the content's environment read-only
    if env && !env.is_a?(ReadOnlyEnvironment)
      env = ReadOnlyEnvironment.new(env, env.options)
    end
    @content_cached = true
    @content = [tree, env]
  else
    @content_cached = true
    @content = nil
  end
end

def initialize(parent = nil, options = nil)

def initialize(parent = nil, options = nil)
  super
  @content_cached = nil
end