Method: PDK::Generate::PuppetObject#templates
- Defined in:
- lib/pdk/generate/puppet_object.rb
#templates ⇒ Array<Hash{Symbol => Object}>
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.
Provides the possible template directory locations in the order in which they should be searched for a valid template.
If a template-url has been specified on in the options hash (e.g. from a CLI parameter), then this template directory will be checked first and we do not fall back to the next possible template directory.
If we have not been provided a specific template directory to use, we try the template specified in the module metadata (as set during PDK::Generate::Module) and fall back to the default template if necessary.
203 204 205 206 207 |
# File 'lib/pdk/generate/puppet_object.rb', line 203 def templates require 'pdk/util/template_uri' @templates ||= PDK::Util::TemplateURI.templates() end |