Class: Acouchi::Which

Inherits:
Object
  • Object
show all
Defined in:
lib/acouchi/which.rb

Class Method Summary collapse

Class Method Details

.find_executable(name) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/acouchi/which.rb', line 3

def self.find_executable name
  require "ptools"
  if executable = File.which(name)
    executable
  else
    raise %{Couldn't find any matches for the aliases "#{aliases.join(", ")}"}
  end
end