Class: Sprockets::Context::ENVProxy
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Sprockets::Context::ENVProxy
- Defined in:
- lib/sprockets/context.rb
Overview
Internal: Proxy for ENV that keeps track of the environment variables used
Instance Method Summary collapse
- #[](key) ⇒ Object
- #fetch(key) ⇒ Object
-
#initialize(context) ⇒ ENVProxy
constructor
A new instance of ENVProxy.
Constructor Details
#initialize(context) ⇒ ENVProxy
Returns a new instance of ENVProxy.
24 25 26 27 |
# File 'lib/sprockets/context.rb', line 24 def initialize(context) @context = context super(ENV) end |
Instance Method Details
#[](key) ⇒ Object
29 30 31 32 |
# File 'lib/sprockets/context.rb', line 29 def [](key) @context.depend_on_env(key) super end |
#fetch(key) ⇒ Object
34 35 36 37 |
# File 'lib/sprockets/context.rb', line 34 def fetch(key, *) @context.depend_on_env(key) super end |