Module: Easyload::Helpers
- Defined in:
- lib/easyload/helpers.rb
Class Method Summary collapse
-
.find_loadable_file(path) ⇒ Object
Looks for a file on the $LOAD_PATH and returns the full path to the first match.
Class Method Details
.find_loadable_file(path) ⇒ Object
Looks for a file on the $LOAD_PATH and returns the full path to the first match.
5 6 7 8 9 10 11 12 |
# File 'lib/easyload/helpers.rb', line 5 def self.find_loadable_file(path) $LOAD_PATH.each do |load_root| full_load_path = File.join(load_root, path) return full_load_path if File.exists? full_load_path end return nil end |