lib/pdk/module/templatedir.rb
# Get a list of template files in the template directory.
#
# @return [Array[String]] An array of file names, relative to the
# `moduleroot` directory.
#
# @api private
Get a list of template files in the template directory.
Get a list of template files in the template directory .
def files_in_template
        @files ||= begin
          template_paths = Dir.glob(File.join(@moduleroot_dir, '**', '*'), File::FNM_DOTMATCH).select do |template_path|
            File.file?(template_path) && !File.symlink?(template_path)
          end
          template_paths.map do |template_path|
            template_path.sub(%r{\A#{Regexp.escape(@moduleroot_dir)}#{Regexp.escape(File::SEPARATOR)}}, '')
          end
        end
      end
def files_in_template @files ||= begin template_paths = Dir . glob ( File . join ( @moduleroot_dir , '**' , '*' ) , File :: FNM_DOTMATCH ) . select do | template_path | File . file? ( template_path ) && ! File . symlink? ( template_path ) end template_paths . map do | template_path | template_path . sub ( %r{ \A #{ Regexp . escape ( @moduleroot_dir ) } #{ Regexp . escape ( File :: SEPARATOR ) } } , '' ) end end end
Get a list of template files in the template directory.
Get a list of template files in the template directory .
] An array of file names, relative to the `moduleroot` directory.
] An array of file names relative to the ` moduleroot ` directory .
Array[String
api
None