Method: PDK::Generate::PuppetObject#render_file

Defined in:
lib/pdk/generate/puppet_object.rb

#render_file(dest_path, template_path, data) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Render a file using the provided template and write it to disk.

Parameters:

  • dest_path (String)

    The path that the rendered file should be written to. Any necessary directories will be automatically created.

  • template_path (String)

    The path on disk to the file containing the template.

  • data (Hash{Object => Object})

    The data to be provided to the template when rendering.

Raises:



150
151
152
153
154
# File 'lib/pdk/generate/puppet_object.rb', line 150

def render_file(dest_path, template_path, data)
  write_file(dest_path) do
    PDK::TemplateFile.new(template_path, data).render
  end
end