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(attributes = ENV, only: Core::EMPTY_ARRAY) ⇒ Environment
constructor
A new instance of Environment.
Constructor Details
#initialize(attributes = ENV, only: Core::EMPTY_ARRAY) ⇒ Environment
Returns a new instance of Environment.
12 13 14 15 |
# File 'lib/etcher/loaders/environment.rb', line 12 def initialize attributes = ENV, only: Core::EMPTY_ARRAY @attributes = attributes @only = Array only end |
Instance Method Details
#call ⇒ Object
17 |
# File 'lib/etcher/loaders/environment.rb', line 17 def call = Success attributes.slice(*only).transform_keys(&:downcase) |