vagrant

https://github.com/mitchellh/vagrant

Ruby

Vagrant is a tool for building and distributing development environments.

Vagrant::Util::Which.which

Cross-platform way of finding an executable in the PATH.

  which('ruby') #=> /usr/bin/ruby

This code is adapted from the following post by mislav:
  http://stackoverflow.com/questions/2108727/which-in-ruby-checking-if-program-exists-in-path-from-ruby

Source | Google | Stack overflow

Edit

git clone [email protected]:mitchellh/vagrant.git

cd vagrant

open lib/vagrant/util/which.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Vagrant--Util--Which-which-for-pr


# Commit to git

git add lib/vagrant/util/which.rbgit commit -m "better docs for Vagrant::Util::Which.which"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Vagrant--Util--Which-which-for-pr

hub pull-request


# Celebrate!