Method: AutomationObject::BluePrint::YamlAdapter.build

Defined in:
lib/automation_object/blue_print/yaml_adapter.rb

.build(path = '') ⇒ AutomationObject::BluePrint::Composite::Top

Returns Composite BluePrint Object.

Parameters:

  • path (String) (defaults to: '')

    path to YAML directory

Returns:



16
17
18
19
20
21
22
23
# File 'lib/automation_object/blue_print/yaml_adapter.rb', line 16

def build(path = '')
  path = File.expand_path(path)

  file_array = File.collect_files(path)
  merged_yaml_hash = load_yaml_files(file_array)

  AutomationObject::BluePrint::HashAdapter.build(merged_yaml_hash)
end