Files

Class/Module Index [+]

Quicksearch

Chef::Deprecation::Mixin::Template

Deprecation::Provider::Mixin::Template

This module contains the deprecated functions of Chef::Mixin::Template. These functions are refactored to different components. They are frozen and will be removed in Chef 12.

Public Instance Methods

render_template(template, context) click to toggle source
# File lib/chef/deprecation/mixin/template.rb, line 32
def render_template(template, context)
  begin
    eruby = Erubis::Eruby.new(template)
    output = eruby.evaluate(context)
  rescue Object => e
    raise TemplateError.new(e, template, context)
  end
  Tempfile.open("chef-rendered-template") do |tempfile|
    tempfile.print(output)
    tempfile.close
    yield tempfile
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.