Class: Prefab::YAMLConfigParser

Inherits:
Object
  • Object
show all
Defined in:
lib/prefab/yaml_config_parser.rb

Constant Summary collapse

LOG =
Prefab::InternalLogger.new(YAMLConfigParser)

Instance Method Summary collapse

Constructor Details

#initialize(file, client) ⇒ YAMLConfigParser

Returns a new instance of YAMLConfigParser.



7
8
9
10
# File 'lib/prefab/yaml_config_parser.rb', line 7

def initialize(file, client)
  @file = file
  @client = client
end

Instance Method Details

#merge(config) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/prefab/yaml_config_parser.rb', line 12

def merge(config)
  yaml = load

  yaml.each do |k, v|
    config = Prefab::LocalConfigParser.parse(k, v, config, @file)
  end

  config
end