Class: Render

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#cfnObject (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_cfndslObject



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