class DTK::DSL::ServiceAndComponentInfo::TransformFrom::Parser::TopDSL::Assemblies

Public Instance Methods

update_output_hash?() click to toggle source
# File lib/dsl/service_and_component_info/transform_from/parser/top_dsl/assemblies.rb, line 24
def update_output_hash?
  input_files(:assemblies).content_hash_array.each do |input_hash|
    name          = input_hash['name'] || raise_error_missing_field('name')
    assembly_hash = input_hash['assembly'] || raise_error_missing_field('assembly')

    assembly_content = {}
    if description  = input_hash['description']
      assembly_content.merge!('description' => description)
    end
    
    assembly_content.merge!(assembly_hash)
    
    if workflows = Workflows.hash_content?(input_hash)
      assembly_content.merge!('actions' => workflows) 
    end

    if node_bindings = input_hash['node_bindings']
      # convert node_bindings to node attributes
      NodeBindings.add_node_properties!(assembly_content, node_bindings) 
    end
    (output_hash['assemblies'] ||= {}).merge!(name => assembly_content)
  end

end