Class: Itamae::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/itamae/config.rb

Constant Summary collapse

CONFIG_MATCHER =
/(-c|--config) +([^ ]+)/

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Config

Returns a new instance of Config.



7
8
9
# File 'lib/itamae/config.rb', line 7

def initialize(options)
  @options = options
end

Instance Method Details

#loadObject



11
12
13
14
15
16
17
18
19
# File 'lib/itamae/config.rb', line 11

def load
  return @options unless config_given?

  configs, options = parse_options
  configs.each do |config|
    options += load_config(config)
  end
  options
end