Class: Condenser::Context::ENVProxy
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Condenser::Context::ENVProxy
- Defined in:
- lib/condenser/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.
22 23 24 25 |
# File 'lib/condenser/context.rb', line 22 def initialize(context) @context = context super(ENV) end |
Instance Method Details
#[](key) ⇒ Object
27 28 29 30 |
# File 'lib/condenser/context.rb', line 27 def [](key) @context.depend_on_env(key) super end |
#fetch(key) ⇒ Object
32 33 34 35 |
# File 'lib/condenser/context.rb', line 32 def fetch(key, *) @context.depend_on_env(key) super end |