Method: Jun::ActiveSupport::Dependencies#find_file
- Defined in:
- lib/jun/active_support/dependencies.rb
#find_file(filename) ⇒ Object
Returns the filepath for a given filename if the file exists in one of the directories specified in autoload_paths.
13 14 15 16 17 18 19 20 |
# File 'lib/jun/active_support/dependencies.rb', line 13 def find_file(filename) autoload_paths.each do |path| filepath = File.join(path, "#{filename}.rb") return filepath if File.file?(filepath) end nil end |