Method: Rake::Application#have_rakefile

Defined in:
lib/rake/application.rb

#have_rakefileObject

True if one of the files in RAKEFILES is in the current directory. If a match is found, it is copied into @rakefile.



219
220
221
222
223
224
225
226
227
228
229
# File 'lib/rake/application.rb', line 219

def have_rakefile
  @rakefiles.each do |fn|
    if File.exist?(fn)
      others = FileList.glob(fn, File::FNM_CASEFOLD)
      return others.size == 1 ? others.first : fn
    elsif fn == ''
      return fn
    end
  end
  return nil
end