Module: LoaderHelper
- Included in:
- ConcordionInvoker
- Defined in:
- lib/loader_helper.rb
Instance Method Summary collapse
Instance Method Details
#path_for(filename) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/loader_helper.rb', line 7 def path_for(filename) return filename if File.exists?(filename) $LOAD_PATH.each do |path| candidate = "#{path}/#{filename}" return candidate if File.exists?(candidate) end throw Exception.new("could not find '#{filename}' on load path") end |