123456789_123456789_123456789_123456789_123456789_

Class: Sprockets::Context::ENVProxy

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, SimpleDelegator
Instance Chain:
self, SimpleDelegator
Inherits: SimpleDelegator
  • Object
Defined in: lib/sprockets/context.rb

Overview

Internal: Proxy for ENV that keeps track of the environment variables used

Class Method Summary

Instance Method Summary

Constructor Details

.new(context) ⇒ ENVProxy

[ GitHub ]

  
# File 'lib/sprockets/context.rb', line 24

def initialize(context)
  @context = context
  super(ENV)
end

Instance Method Details

#[](key)

[ GitHub ]

  
# File 'lib/sprockets/context.rb', line 29

def [](key)
  @context.depend_on_env(key)
  super
end

#fetch(key)

[ GitHub ]

  
# File 'lib/sprockets/context.rb', line 34

def fetch(key, *)
  @context.depend_on_env(key)
  super
end