lib/pdk/generators/puppet_object.rb
def templates
        @templates ||= [
          { type: 'CLI', url: @options[:'template-url'], allow_fallback: false },
          { type: 'metadata', url: module_metadata.data['template-url'], allow_fallback: true },
          { type: 'default', url: PDK::Generate::Module::DEFAULT_TEMPLATE, allow_fallback: false },
        ]
      end
# 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.
#
# @return [Array<Hash{Symbol => Object}>] an array of hashes. Each hash
#   contains 3 keys: :type contains a String that describes the template
#   directory, :url contains a String with the URL to the template
#   directory, and :allow_fallback contains a Boolean that specifies if
#   the lookup process should proceed to the next template directory if
#   the template file is not in this template directory.
#
# @api private
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 , 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.
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 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 .
def templates
        @templates ||= [
          { type: 'CLI', url: @options[:'template-url'], allow_fallback: false },
          { type: 'metadata', url: module_metadata.data['template-url'], allow_fallback: true },
          { type: 'default', url: PDK::Generate::Module::DEFAULT_TEMPLATE, allow_fallback: false },
        ]
      end
def templates @templates ||= [ { type : 'CLI' , url : @options [ :' template-url ' ] , allow_fallback : false } , { type : 'metadata' , url : module_metadata . data [ 'template-url' ] , allow_fallback : true } , { type : 'default' , url : PDK :: Generate :: Module :: DEFAULT_TEMPLATE , allow_fallback : false } , ] end
Provides the possible template directory locations in the order in
which they should be searched for a valid template.
Provides the possible template directory locations in the order in which they should be searched for a valid template .
an array of hashes. Each hash contains 3 keys: :type contains a String that describes the template directory, :url contains a String with the URL to the template directory, and :allow_fallback contains a Boolean that specifies if the lookup process should proceed to the next template directory if the template file is not in this template directory.
an array of hashes . Each hash contains 3 keys : : type contains a String that describes the template directory : url contains a String with the URL to the template directory and : allow_fallback contains a Boolean that specifies if the lookup process should proceed to the next template directory if the template file is not in this template directory .
Array<Hash{Symbol => Object}>
api
None