Method: PDK::TemplateFile#render
- Defined in:
- lib/pdk/template_file.rb
#render ⇒ String
Renders the template by calling the appropriate engine based on the file extension.
If the template has an ‘.erb` extension, the content of the template file will be treated as an ERB template. All other extensions are treated as plain text.
38 39 40 41 42 43 44 45 |
# File 'lib/pdk/template_file.rb', line 38 def render case File.extname(@template_file) when '.erb' render_erb else render_plain end end |