Class: Etcher::Loaders::Environment

Inherits:
Object
  • Object
show all
Defined in:
lib/etcher/loaders/environment.rb

Overview

Loads environment configuration with optional includes.

Instance Method Summary collapse

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

#callObject



17
# File 'lib/etcher/loaders/environment.rb', line 17

def call = Success attributes.slice(*only).transform_keys(&:downcase)