Class: Jets::Cfn::TemplateBuilders::FunctionBuilder

Inherits:
BaseChildBuilder show all
Defined in:
lib/jets/cfn/template_builders/function_builder.rb

Instance Method Summary collapse

Methods inherited from BaseChildBuilder

#add_class_iam_policy, #add_common_parameters, #add_function, #add_functions, #add_iam_policy, #initialize

Methods included from Interface

#add_output, #add_parameter, #add_resource, #build, #post_process_template, #template, #text, #write

Constructor Details

This class inherits a constructor from Jets::Cfn::TemplateBuilders::BaseChildBuilder

Instance Method Details

#composeObject

compose is an interface method for Interface module



4
5
6
7
# File 'lib/jets/cfn/template_builders/function_builder.rb', line 4

def compose
  add_common_parameters
  add_functions
end

#template_pathObject

For function stacks, ensure there’s a _function.yml at the end of the template_path name for easy identification.



11
12
13
14
15
16
17
# File 'lib/jets/cfn/template_builders/function_builder.rb', line 11

def template_path
  path = super
  unless path.include?("function.yml")
    path = path.sub(".yml", "_function.yml")
  end
  path
end