Class: Exekutor::Internal::CLI::Manager::ConfigLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/exekutor/internal/cli/manager.rb

Overview

Takes care of loading YAML configuration

Instance Method Summary collapse

Constructor Details

#initialize(files, options) ⇒ ConfigLoader

Returns a new instance of ConfigLoader.



239
240
241
242
# File 'lib/exekutor/internal/cli/manager.rb', line 239

def initialize(files, options)
  @config_files = files
  @options = options
end

Instance Method Details

#load_config(worker_options) ⇒ Object



244
245
246
247
248
249
250
251
252
253
# File 'lib/exekutor/internal/cli/manager.rb', line 244

def load_config(worker_options)
  each_file do |path|
    config = load_config_file(path)
    convert_duration_options! config

    worker_options.merge! extract_worker_options!(config)
    apply_config_file(config)
  end
  Exekutor.config
end