PathList

A PathList is an array containing 1..n paths. It is useful to regroup paths and make lookups on them.

Usage

 path = PathList.new(ENV['PATH'])
 path.find 'env'            #=> "/usr/bin/env"

 # This is already done when including the library
 $:.class                   #=> Array
 $:.extend PathList::Finder
 $:.find_ext = 'rb'

 $:.find 'uri'              #=> "/usr/lib/ruby/1.8/uri.rb"

Authors

  • Jonas Pfenniger

Copying

Copyright (c) 2005 Jonas Pfenniger

Ruby License

This module is free software. You may use, modify, and/or redistribute this software under the same terms as Ruby.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.