Class: Jets::Cfn::Builders::FunctionBuilder

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

Instance Method Summary collapse

Methods inherited from BaseChildBuilder

#add_class_iam_policy, #add_common_parameters, #add_function, #add_function_iam_policy, #add_functions, #initialize

Methods included from Interface

#add_output, #add_outputs, #add_parameter, #add_parameters, #add_resource, #add_resources, #add_template_resource, #build, #post_process_template, #template, #text, #write

Constructor Details

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

Instance Method Details

#composeObject

compose is an interface method for Interface module



4
5
6
7
# File 'lib/jets/cfn/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/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