Method: Rake::AltSystem.find_runnable

Defined in:
lib/rake/alt_system.rb

.find_runnable(file) ⇒ Object



73
74
75
76
77
78
79
80
81
82
83
# File 'lib/rake/alt_system.rb', line 73

def find_runnable(file)
  if file =~ RUNNABLE_PATTERN
    file
  else
    RUNNABLE_EXTS.each { |ext|
      test = "#{file}.#{ext}"
      return test if File.exist?(test)
    }
    nil
  end
end