From fec6adcaf35f6411401081d2c463f58a527867dd Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Tue, 14 Oct 2014 18:17:27 -0300 Subject: [PATCH] Add the Ruby gem to readme file. --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 86a5378..a18531b 100644 --- a/README.md +++ b/README.md @@ -37,10 +37,14 @@ The above comments work both as source code documentation and as help text, as w ### For Ruby +``` +gem install easyoptions +``` + After writing your documentation, you simply require this script. Then all command line options will get parsed into the `$options` hash, as described above. You can then check their values for reacting to them. All regular arguments will get stored into the `$arguments` array. Here is an example for parsing the comments above: ```ruby -require_relative "easyoptions" +require "easyoptions" # Boolean options puts "Option specified: --some-option" if $options[:some_option]