8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/stack_master/parameter_loader.rb', line 8
def self.load(parameter_files: [], parameters: {})
StackMaster.debug 'Searching for parameter files...'
all_parameters = parameter_files.map { |file_name| load_parameters(file_name) } + [parameters]
all_parameters.reduce({template_parameters: {}, compile_time_parameters: {}}) do |hash, parameters|
template_parameters = create_template_parameters(parameters)
compile_time_parameters = create_compile_time_parameters(parameters)
merge_and_camelize(hash[:template_parameters], template_parameters)
merge_and_camelize(hash[:compile_time_parameters], compile_time_parameters)
hash
end
end
|