class Momo::CFL

Public Class Methods

new(&block) click to toggle source
# File lib/momo/cfl.rb, line 6
def initialize(&block)
        @stack = Stack.new(&block)
end

Public Instance Methods

templatize() click to toggle source
# 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