From: Sho Hashimoto Date: Sat, 26 Jun 2010 04:49:19 +0000 (+0900) Subject: fix README X-Git-Url: http://shokai.org/projects/git/?a=commitdiff_plain;h=0c08c65583e3492c69fa81df876bffec37640e1d;p=ArgsParser%2F.git fix README --- 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: