Method: Copy::Router#template_file

Defined in:
lib/copy/router.rb

#template_fileObject



16
17
18
19
20
21
22
# File 'lib/copy/router.rb', line 16

def template_file
  @template_file ||= if file = Dir.glob(File.join(@views, "#{path_with_format}*")).first
    file
  elsif index = Dir.glob(File.join(@views, path_without_format, "index.#{format}*")).first
    index
  end
end