Class: Momo::CFL

Inherits:
Object
  • Object
show all
Defined in:
lib/momo/cfl.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ CFL

Returns a new instance of CFL.



6
7
8
# File 'lib/momo/cfl.rb', line 6

def initialize(&block)
	@stack = Stack.new(&block)
end

Instance Method Details

#templatizeObject



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/momo/cfl.rb', line 10

def templatize()

	template = {"AWSTemplateFormatVersion" => "2010-09-09"}
	template["Description"] = @stack.description

	template["Mappings"] = @stack.templatize_mappings
	template["Resources"] = @stack.templatize_resources
	template["Conditions"] = @stack.templatize_conditions
	template["Parameters"] = @stack.templatize_params if @stack.parameters.length > 0
	template["Outputs"] = @stack.templatize_outputs if @stack.outputs.length > 0

	template.to_json
end