Class: Linchpin::Templater
- Inherits:
-
Object
- Object
- Linchpin::Templater
- Includes:
- ERB::Util
- Defined in:
- lib/linchpin/templater.rb
Instance Method Summary collapse
-
#initialize(entry_project) ⇒ Templater
constructor
A new instance of Templater.
- #render ⇒ Object
Constructor Details
#initialize(entry_project) ⇒ Templater
Returns a new instance of Templater.
8 9 10 11 |
# File 'lib/linchpin/templater.rb', line 8 def initialize(entry_project) @entry_project = entry_project @template_loc = File.join(File.join(File.dirname(File.(__FILE__)), 'dockerfiles'),'dotnet-Dockerfile.erb') end |
Instance Method Details
#render ⇒ Object
13 14 15 16 |
# File 'lib/linchpin/templater.rb', line 13 def render template = ERB.new File.new(@template_loc).read, nil, '%' template.result(binding) end |