Sha256: bd772d98a80cf1adefbe0f2b0c270060126cc7b380a7605d784a3e75ed725e04

Contents?: true

Size: 444 Bytes

Versions: 18

Compression:

Stored size: 444 Bytes

Contents

# frozen_string_literal: true

# Cfnlego
module Cfnlego
  # CloudFormation
  class CloudFormation
    TEMPLATE = "#{File.dirname(__FILE__)}/cloudformation.erb"

    attr_reader :resources

    def initialize(resources)
      @description = 'auto generated cloudformation cfndsl template'
      @resources   = resources
    end

    def render
      erb = ERB.new(File.read(TEMPLATE), trim_mode: '-')
      erb.result(binding)
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
cfndsl-1.7.2 lib/cfndsl/cfnlego/cloudformation.rb
cfndsl-1.6.0 lib/cfndsl/cfnlego/cloudformation.rb
cfndsl-1.5.0 lib/cfndsl/cfnlego/cloudformation.rb
cfndsl-1.4.0 lib/cfndsl/cfnlego/cloudformation.rb
cfndsl-1.3.9 lib/cfndsl/cfnlego/cloudformation.rb
cfndsl-1.3.8 lib/cfndsl/cfnlego/cloudformation.rb
cfndsl-1.3.7 lib/cfndsl/cfnlego/cloudformation.rb
cfndsl-1.3.6 lib/cfndsl/cfnlego/cloudformation.rb
cfndsl-1.3.5 lib/cfndsl/cfnlego/cloudformation.rb
cfndsl-1.3.4 lib/cfndsl/cfnlego/cloudformation.rb
cfndsl-1.3.3 lib/cfndsl/cfnlego/cloudformation.rb
cfndsl-1.3.2 lib/cfndsl/cfnlego/cloudformation.rb
cfndsl-1.3.1 lib/cfndsl/cfnlego/cloudformation.rb
cfndsl-1.3.0 lib/cfndsl/cfnlego/cloudformation.rb
cfndsl-1.2.0 lib/cfndsl/cfnlego/cloudformation.rb
cfndsl-1.1.1 lib/cfndsl/cfnlego/cloudformation.rb
cfndsl-1.1.0 lib/cfndsl/cfnlego/cloudformation.rb
cfndsl-1.0.6 lib/cfndsl/cfnlego/cloudformation.rb