Class: Etcher::Loaders::Environment
- Inherits:
-
Object
- Object
- Etcher::Loaders::Environment
- Defined in:
- lib/etcher/loaders/environment.rb
Overview
Loads environment configuration with optional includes.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(includes = Core::EMPTY_ARRAY, source: ENV) ⇒ Environment
constructor
A new instance of Environment.
Constructor Details
#initialize(includes = Core::EMPTY_ARRAY, source: ENV) ⇒ Environment
Returns a new instance of Environment.
12 13 14 15 |
# File 'lib/etcher/loaders/environment.rb', line 12 def initialize includes = Core::EMPTY_ARRAY, source: ENV @includes = Array includes @source = source end |
Instance Method Details
#call ⇒ Object
17 |
# File 'lib/etcher/loaders/environment.rb', line 17 def call = Success source.slice(*includes).transform_keys(&:downcase) |