module YARD::Templates::Template::ClassMethods

def find_nth_file(basename, index = 1)

Returns:
  • (String) - the full path of the nth file on disk with

Parameters:
  • index (Fixnum) -- the nth existing file to return
  • basename (String) -- the filename to search for
def find_nth_file(basename, index = 1)
  n = 1
  full_paths.each do |path|
    file = File.join(path, basename)
    if File.file?(file)
      return file if index == n
      n += 1
    end
  end
  nil
end