method

find_paths

Importance_0
Ruby latest stable (v2_5_5) - 0 notes - Class: WhichCommand
find_paths(package_name, dirs) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rubygems/commands/which_command.rb, line 70
  def find_paths(package_name, dirs)
    result = []

    dirs.each do |dir|
      Gem.suffixes.each do |ext|
        full_path = File.join dir, "#{package_name}#{ext}"
        if File.exist? full_path and not File.directory? full_path then
          result << full_path
          return result unless options[:show_all]
        end
      end
    end

    result
  end
Register or log in to add new notes.