Class: Herdsman::Config
- Inherits:
-
Object
- Object
- Herdsman::Config
- Defined in:
- lib/herdsman/config.rb
Instance Method Summary collapse
-
#initialize(path, overrides = {}) ⇒ Config
constructor
A new instance of Config.
- #repos ⇒ Object
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
#repos ⇒ Object
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 |