vagrant

https://github.com/mitchellh/vagrant

Ruby

Vagrant is a tool for building and distributing development environments.

Vagrant::Plugin::V1::Command#parse_options

Parses the options given an OptionParser instance.

This is a convenience method that properly handles duping the
originally argv array so that it is not destroyed.

This method will also automatically detect "-h" and "--help"
and print help. And if any invalid options are detected, the help
will be printed, as well.

If this method returns `nil`, then you should assume that help
was printed and parsing failed.

Source | Google | Stack overflow

Edit

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

cd vagrant

open lib/vagrant/plugin/v1/command.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Vagrant--Plugin--V1--Command-parse_options-for-pr


# Commit to git

git add lib/vagrant/plugin/v1/command.rbgit commit -m "better docs for Vagrant::Plugin::V1::Command#parse_options"


# 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--Plugin--V1--Command-parse_options-for-pr

hub pull-request


# Celebrate!