|
Versions Of This Snippet::
Download a raw-text version of this code by clicking on "Download Version"
Latest Snippet Version: :1.0
def which(name)
ENV['PATH'].split(':').map { |p| File.join p, name }.find { |p| File.file? p and File.executable? p }
end
Submit a new versionYou can submit a new version of this snippet if you have modified it and you feel it is appropriate to share with others..
|
||||||||||||||||||||||||||
