module Terraformer::Templating

Public Instance Methods

apply_template(erb) click to toggle source
# File lib/terraformer/templating.rb, line 3
def apply_template(erb)
  ERB.new(open(template_path(erb)).read, nil, "-").result(binding)
end
template_path(template_name) click to toggle source
# File lib/terraformer/templating.rb, line 7
def template_path(template_name)
  File.join(File.expand_path(File.dirname(__FILE__)), "template", template_name) << ".erb"
end