Class: Prefab::YAMLConfigParser

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

Instance Method Summary collapse

Constructor Details

#initialize(file, client) ⇒ YAMLConfigParser

Returns a new instance of YAMLConfigParser.



5
6
7
8
# File 'lib/prefab/yaml_config_parser.rb', line 5

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

Instance Method Details

#merge(config) ⇒ Object



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

def merge(config)
  yaml = load

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

  config
end