From 96277b62d0dc504590a401c02adfb7f98562c0e8 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 23 Jan 2013 21:51:03 -0500 Subject: [PATCH] update usage information / example configuration --- README.md | 12 +++++++++++- lib/yawpa.rb | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c285f0f..8620785 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,17 @@ Or install it yourself as: ## Usage -require 'yawpa' + require 'yawpa' + + options = { + version: {}, + verbose: {short: 'v'}, + get: {nargs: 1}, + set: {nargs: 2}, + } + opts, args = Yawpa.parse(ARGV, options) + opts.each_pair do |opt, val| + end ## Contributing diff --git a/lib/yawpa.rb b/lib/yawpa.rb index a1572c1..a060326 100644 --- a/lib/yawpa.rb +++ b/lib/yawpa.rb @@ -3,7 +3,7 @@ require "yawpa/version" # Example options configuration: # { # version: {}, -# verbose: {aliases: ['-v']}, +# verbose: {short: 'v'}, # get: {nargs: 1}, # set: {nargs: 2}, # }