Class: Render
- Inherits:
-
Object
- Object
- Render
- Defined in:
- lib/render.rb
Instance Attribute Summary collapse
-
#cfn ⇒ Object
readonly
Returns the value of attribute cfn.
Instance Method Summary collapse
- #cfn_to_cfndsl ⇒ Object
-
#initialize(cfn) ⇒ Render
constructor
A new instance of Render.
Constructor Details
#initialize(cfn) ⇒ Render
Returns a new instance of Render.
6 7 8 |
# File 'lib/render.rb', line 6 def initialize(cfn) @cfn = cfn end |
Instance Attribute Details
#cfn ⇒ Object (readonly)
Returns the value of attribute cfn.
4 5 6 |
# File 'lib/render.rb', line 4 def cfn @cfn end |
Instance Method Details
#cfn_to_cfndsl ⇒ Object
10 11 12 13 14 |
# File 'lib/render.rb', line 10 def cfn_to_cfndsl input = File.read("#{File.dirname(__FILE__)}/cfndsl.erb") context = { :cfn => @cfn } Erubis::Eruby.new(input).evaluate(context).to_s end |