Method: Retrospec::Puppet::Generators::FunctionGenerator#template_dir
- Defined in:
-
lib/retrospec/plugins/v1/plugin/generators/function_generator.rb,
lib/retrospec/plugins/v1/plugin/generators/function_generator.rb
Puppet currently has two versions of functions (v3, v4). At the time of writing v4 is still new and not used very much. Because of this we will want to allow the user to pick which version of puppet function dsl they wish to use. Based on the version, a slightly different template will be rendered. This method will return the template dir based on the version passed in. By default this method looks inside the user supplied template dir for existence of a template and if true returns that base path, if false returns the template directory inside the gem location which is mainly used for development only.
26 27 28 |
# File 'lib/retrospec/plugins/v1/plugin/generators/function_generator.rb', line 26 def template_dir @template_dir end |