From 0c08c65583e3492c69fa81df876bffec37640e1d Mon Sep 17 00:00:00 2001 From: Sho Hashimoto Date: Sat, 26 Jun 2010 13:49:19 +0900 Subject: [PATCH] fix README --- README.rdoc | 40 ++++++++++++++++++---------------------- 1 files changed, 18 insertions(+), 22 deletions(-) diff --git a/README.rdoc b/README.rdoc index 7a11793..546c490 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,34 +1,30 @@ = ArgsParser -* http://bitbucket.org/shokai/argsparser-ruby +* http://github.com/shokai/argsparser-ruby == DESCRIPTION: * Parse args from command line. -== FEATURES/PROBLEMS: - - - == SYNOPSIS: -parser = ArgsParser.parser -parser.bind(:help, :h, "show help") -parser.bind(:size, :s, "size") -parser.comment(:min, "min size") -parser.comment(:max, "max size") -parser.comment(:debug, "debug mode") - -params = parser.parse(ARGV) - -if parser.has_option(:help) or !parser.has_params([:size, :max, :min]) - puts parser.help - puts 'e.g. ./example.rb -s 320x240 -min 100 -max 500' -end - -puts params[:size] - -p params + parser = ArgsParser.parser + parser.bind(:help, :h, "show help") + parser.bind(:size, :s, "size") + parser.comment(:min, "min size") + parser.comment(:max, "max size") + parser.comment(:debug, "debug mode") + + params = parser.parse(ARGV) + + if parser.has_option(:help) or !parser.has_params([:size, :max, :min]) + puts parser.help + puts 'e.g. ./example.rb -s 320x240 -min 100 -max 500' + end + + puts params[:size] + + p params == INSTALL: -- 1.6.3