Module: Trusty::Utilities::PathFinder::ClassMethods
- Included in:
- Trusty::Utilities::PathFinder
- Defined in:
- lib/trusty/utilities/path_finder.rb
Instance Method Summary collapse
Instance Method Details
#find(filename, paths = []) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/trusty/utilities/path_finder.rb', line 5 def find(filename, paths = []) if File.file?(filename) filename elsif root = Array(paths).find{|path| File.file?(File.join(path, filename))} File.join(root, filename) end end |