Class: DTK::DSL::Template::V1::ServiceInstance

Inherits:
DTK::DSL::Template::V1 show all
Defined in:
lib/dsl/template/v1/service_instance.rb

Defined Under Namespace

Modules: Constant

Constant Summary

Constants inherited from DTK::DSL::Template::V1

VERSION

Instance Attribute Summary

Attributes included from NestedDSLFile::Mixin

#nested_file_content

Attributes included from Generation::Mixin

#filter, #top

Attributes included from Parsing::Mixin

#file_obj, #parent_key

Instance Method Summary collapse

Methods inherited from DTK::DSL::Template::V1

#dsl_version, #template_version

Methods inherited from DTK::DSL::Template

#add, create_for_generation, create_for_parsing, #initialize, #merge, #req, #set, #set?, #val

Methods included from Parsing::ClassMixin

#elements_collection_type, #file_parser_output_array, #file_parser_output_hash, #parse_element, #parse_elements

Methods included from Generation::ClassMixin

#generate_elements

Methods included from Generation::Mixin

#generate?, #generate_yaml_file_path__content_array, #generate_yaml_object, #generate_yaml_object?, #generate_yaml_text, #yaml_object_type

Methods included from Parsing::Mixin

#parse, #parser_output_type, #parsing_error

Constructor Details

This class inherits a constructor from DTK::DSL::Template

Instance Method Details

#generate!Object

For generation



43
44
45
46
47
48
# File 'lib/dsl/template/v1/service_instance.rb', line 43

def generate!
  set :DSLVersion, req(:DSLVersion)
  set :Name, req(:Name)
  set? :DependentModules, val(:DependentModules)
  merge generate_child(:assembly, req(:Assembly))
end

#parse!Object

For parsing



33
34
35
36
37
38
39
40
# File 'lib/dsl/template/v1/service_instance.rb', line 33

def parse!
  remove_processed_keys_from_input_hash! do
    set :DSLVersion, input_key_value(:DSLVersion)
    set :Name, input_key_value(:DSLVersion)
    set? :DependentModules, input_key_value?(:DependentModules)
  end
  merge parse_child(:assembly, input_hash)
end