Class: Herdsman::Config

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

Instance Method Summary collapse

Constructor Details

#initialize(path, overrides = {}) ⇒ Config

Returns a new instance of Config.



6
7
8
9
10
# File 'lib/herdsman/config.rb', line 6

def initialize(path, overrides = {})
  @config    = read_config!(path)
  @overrides = overrides
  validate!
end

Instance Method Details

#reposObject



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

def repos
  config_repos.map do |herd_member_config|
    args = herd_member_args(herd_member_config)
    herd_member_paths(herd_member_config).map do |path|
      HerdMemberConfig.new(path, args, overrides, config_defaults)
    end
  end.flatten
end