Class: Standard::FileFinder

Inherits:
Object
  • Object
show all
Defined in:
lib/standard/file_finder.rb

Instance Method Summary collapse

Instance Method Details

#call(name, search_path) ⇒ Object


5
6
7
8
9
10
11
# File 'lib/standard/file_finder.rb', line 5

def call(name, search_path)
  Pathname.new(search_path).expand_path.ascend do |path|
    if (file = path + name).exist?
      return file.to_s
    end
  end
end