Sha256: 25cb2ee78caccee972dbdbb56e32648710c7c094c4d221ae17de8312fb399dc5

Contents?: true

Size: 254 Bytes

Versions: 218

Compression:

Stored size: 254 Bytes

Contents

require "pathname"

module Standard
  class FileFinder
    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
  end
end

Version data entries

218 entries across 218 versions & 5 rubygems

Version Path
standard-1.45.0 lib/standard/file_finder.rb
standard-1.44.0 lib/standard/file_finder.rb
standard-1.43.0 lib/standard/file_finder.rb
standard-1.42.1 lib/standard/file_finder.rb
standard-1.42.0 lib/standard/file_finder.rb
standard-1.41.1 lib/standard/file_finder.rb
standard-1.41.0 lib/standard/file_finder.rb
standard-1.40.1 lib/standard/file_finder.rb
standard-1.40.0 lib/standard/file_finder.rb
standard-1.39.2 lib/standard/file_finder.rb
standard-1.39.1 lib/standard/file_finder.rb
standard-1.39.0 lib/standard/file_finder.rb
standard-1.38.0 lib/standard/file_finder.rb
standard-1.37.0 lib/standard/file_finder.rb
harbr-2.8.1 vendor/bundle/ruby/3.2.0/gems/standard-1.32.0/lib/standard/file_finder.rb
standard-1.35.0.1 lib/standard/file_finder.rb
standard-1.34.0.1 lib/standard/file_finder.rb
standard-1.35.1 lib/standard/file_finder.rb
standard-1.35.0 lib/standard/file_finder.rb
standard-1.34.0 lib/standard/file_finder.rb