Sha256: 2b61dc5202999b70d896cee684dfb60e5d9e54879e8bd6bba4e1265ec5430b55
Contents?: true
Size: 933 Bytes
Versions: 4
Compression:
Stored size: 933 Bytes
Contents
module Puppet::Module::Tool # = Skeleton # # This class provides methods for finding templates for the 'generate' action. class Skeleton # TODO Review whether the 'freeze' feature should be fixed or deleted. # def freeze! # FileUtils.rm_fr custom_path rescue nil # FileUtils.cp_r default_path, custom_path # end # Return Pathname with 'generate' templates. def path paths.detect { |path| path.directory? } end # Return Pathnames to look for 'generate' templates. def paths @paths ||= [ custom_path, default_path ] end # Return Pathname of custom templates directory. def custom_path Puppet::Module::Tool.working_dir + 'skeleton' end # Return Pathname of default template directory. def default_path Puppet::Module::Tool.root + 'templates' + 'generator' end end end
Version data entries
4 entries across 4 versions & 1 rubygems