Class: Cfnlego::CloudFormation
- Inherits:
-
Object
- Object
- Cfnlego::CloudFormation
- Defined in:
- lib/cfnlego/cloudformation.rb
Overview
CloudFormation
Constant Summary collapse
- TEMPLATE =
"#{File.dirname(__FILE__)}/cloudformation.erb".freeze
Instance Attribute Summary collapse
-
#resources ⇒ Object
readonly
Returns the value of attribute resources.
Instance Method Summary collapse
-
#initialize(resources) ⇒ CloudFormation
constructor
A new instance of CloudFormation.
- #render ⇒ Object
Constructor Details
#initialize(resources) ⇒ CloudFormation
Returns a new instance of CloudFormation.
9 10 11 12 |
# File 'lib/cfnlego/cloudformation.rb', line 9 def initialize(resources) @description = 'auto generated cloudformation cfndsl template' @resources = resources end |
Instance Attribute Details
#resources ⇒ Object (readonly)
Returns the value of attribute resources.
7 8 9 |
# File 'lib/cfnlego/cloudformation.rb', line 7 def resources @resources end |
Instance Method Details
#render ⇒ Object
14 15 16 17 |
# File 'lib/cfnlego/cloudformation.rb', line 14 def render erb = ERB.new(File.read(TEMPLATE), nil, '-') erb.result(binding) end |