lib/pdk/generate/puppet_object.rb in pdk-1.14.1 vs lib/pdk/generate/puppet_object.rb in pdk-1.15.0

- old
+ new

@@ -258,19 +258,18 @@ # @raise [PDK::CLI::FatalError] if no suitable template could be found. # # @api private def with_templates require 'pdk/logger' - require 'pdk/module/templatedir' require 'pdk/util/template_uri' templates.each do |template| if template[:uri].nil? PDK.logger.debug(_('No %{dir_type} template found; trying next template directory.') % { dir_type: template[:type] }) next end - PDK::Module::TemplateDir.new(PDK::Util::TemplateURI.new(template[:uri])) do |template_dir| + PDK::Module::TemplateDir.with(PDK::Util::TemplateURI.new(template[:uri])) do |template_dir| template_paths = template_dir.object_template_for(object_type) if template_paths config_hash = template_dir.object_config yield template_paths, config_hash