ÿØÿà JFIF ÿÛ „ ( %!1!%*+...983,7(-.-
set_options-i.ri 0000644 00000000712 15236466367 0007716 0 ustar 00 U:RDoc::AnyMethod[iI"set_options:ETI"GetoptLong#set_options;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"=\Set options. Takes the same argument as GetoptLong.new.;To:RDoc::Markup::BlankLine o;
; [I"DRaises a RuntimeError if option processing has already started.;T:
@fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(*arguments);T@FI"GetoptLong;TcRDoc::NormalClass00 AmbiguousOption/cdesc-AmbiguousOption.ri 0000644 00000000675 15236466367 0014461 0 ustar 00 U:RDoc::NormalClass[iI"AmbiguousOption:ETI" GetoptLong::AmbiguousOption;TI"GetoptLong::Error;To:RDoc::Markup::Document:@parts[o;;[ :
@fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below0; 0;
0[ [ [ [[I"
class;T[[:public[ [:protected[ [:private[ [I"
instance;T[[;[ [;[ [;
[ [ [U:RDoc::Context::Section[i 0o;;[ ; 0;
0[I"lib/getoptlong.rb;TI"GetoptLong;TcRDoc::NormalClass NeedlessArgument/cdesc-NeedlessArgument.ri 0000644 00000000677 15236466367 0014725 0 ustar 00 U:RDoc::NormalClass[iI"NeedlessArgument:ETI"!GetoptLong::NeedlessArgument;TI"GetoptLong::Error;To:RDoc::Markup::Document:@parts[o;;[ :
@fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below0; 0;
0[ [ [ [[I"
class;T[[:public[ [:protected[ [:private[ [I"
instance;T[[;[ [;[ [;
[ [ [U:RDoc::Context::Section[i 0o;;[ ; 0;
0[I"lib/getoptlong.rb;TI"GetoptLong;TcRDoc::NormalClass InvalidOption/cdesc-InvalidOption.ri 0000644 00000000671 15236466367 0013543 0 ustar 00 U:RDoc::NormalClass[iI"InvalidOption:ETI"GetoptLong::InvalidOption;TI"GetoptLong::Error;To:RDoc::Markup::Document:@parts[o;;[ :
@fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below0; 0;
0[ [ [ [[I"
class;T[[:public[ [:protected[ [:private[ [I"
instance;T[[;[ [;[ [;
[ [ [U:RDoc::Context::Section[i 0o;;[ ; 0;
0[I"lib/getoptlong.rb;TI"GetoptLong;TcRDoc::NormalClass MissingArgument/cdesc-MissingArgument.ri 0000644 00000000675 15236466367 0014441 0 ustar 00 U:RDoc::NormalClass[iI"MissingArgument:ETI" GetoptLong::MissingArgument;TI"GetoptLong::Error;To:RDoc::Markup::Document:@parts[o;;[ :
@fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below0; 0;
0[ [ [ [[I"
class;T[[:public[ [:protected[ [:private[ [I"
instance;T[[;[ [;[ [;
[ [ [U:RDoc::Context::Section[i 0o;;[ ; 0;
0[I"lib/getoptlong.rb;TI"GetoptLong;TcRDoc::NormalClass ordering-i.ri 0000644 00000000435 15236466367 0007163 0 ustar 00 U:RDoc::Attr[iI"
ordering:ETI"GetoptLong#ordering;TI"R;T:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"Return ordering.;T:
@fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below0F@I"GetoptLong;TcRDoc::NormalClass0 new-c.ri 0000644 00000002074 15236466367 0006136 0 ustar 00 U:RDoc::AnyMethod[iI"new:ETI"GetoptLong::new;TT:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"\Set up option processing.;To:RDoc::Markup::BlankLine o;
; [I"GThe options to support are passed to new() as an array of arrays. ;TI"KEach sub-array contains any number of String option names which carry ;TI"6the same meaning, and one of the following flags:;T@o:RDoc::Markup::List:
@type: NOTE:@items[o:RDoc::Markup::ListItem:@label[I"GetoptLong::NO_ARGUMENT ;T; [o;
; [I"&Option does not take an argument.;T@o;;[I"#GetoptLong::REQUIRED_ARGUMENT ;T; [o;
; [I"%Option always takes an argument.;T@o;;[I"#GetoptLong::OPTIONAL_ARGUMENT ;T; [o;
; [I",Option may or may not take an argument.;T@o;
; [I"OThe first option name is considered to be the preferred (canonical) name. ;TI"IOther than that, the elements of each sub-array can be in any order.;T:
@fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(*arguments);T@/FI"GetoptLong;TcRDoc::NormalClass00 Error/cdesc-Error.ri 0000644 00000000727 15236466367 0010371 0 ustar 00 U:RDoc::NormalClass[iI"
Error:ETI"GetoptLong::Error;TI"StandardError;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I"Error types.;T:
@fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below0;
0;0[ [ [ [[I"
class;T[[:public[ [:protected[ [:private[ [I"
instance;T[[;[ [;
[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;
0;0[I"lib/getoptlong.rb;TI"GetoptLong;TcRDoc::NormalClass quiet%3f-i.ri 0000644 00000000442 15236466367 0006775 0 ustar 00 U:RDoc::Attr[iI"quiet?:ETI"GetoptLong#quiet?;TI"RW;T:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"\Set/Unset `quiet' mode.;T:
@fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below0F@I"GetoptLong;TcRDoc::NormalClass0 get-i.ri 0000644 00000001336 15236466367 0006132 0 ustar 00 U:RDoc::AnyMethod[iI"get:ETI"GetoptLong#get;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"HGet next option name and its argument, as an Array of two elements.;To:RDoc::Markup::BlankLine o;
; [I"BThe option name is always converted to the first (preferred) ;TI":name given in the original options to GetoptLong.new.;T@o;
; [I"#Example: ['--option', 'value'];T@o;
; [I"AReturns nil if the processing is complete (as determined by ;TI"STATUS_TERMINATED).;T:
@fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below000[[I"get_option;To;; [o;
; [I"'`get_option' is an alias of `get'.;T;@;
0I"();T@FI"GetoptLong;TcRDoc::NormalClass00 error%3f-i.ri 0000644 00000000470 15236466367 0007000 0 ustar 00 U:RDoc::Attr[iI"error?:ETI"GetoptLong#error?;TI"R;T:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"4Examine whether an option processing is failed.;T:
@fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below0F@I"GetoptLong;TcRDoc::NormalClass0 ordering%3d-i.ri 0000644 00000004701 15236466367 0007457 0 ustar 00 U:RDoc::AnyMethod[iI"ordering=:ETI"GetoptLong#ordering=;TF:privateo:RDoc::Markup::Document:@parts["o:RDoc::Markup::Paragraph; [I"A\Set the handling of the ordering of options and arguments. ;TI"GA RuntimeError is raised if option processing has already started.;To:RDoc::Markup::BlankLine o;
; [I"MThe supplied value must be a member of GetoptLong::ORDERINGS. It alters ;TI"*the processing of options as follows:;T@o;
; [I"REQUIRE_ORDER :;T@o;
; [I"6Options are required to occur before non-options.;T@o;
; [I"NProcessing of options ends as soon as a word is encountered that has not ;TI"1been preceded by an appropriate option flag.;T@o;
; [ I"HFor example, if -a and -b are options which do not take arguments, ;TI"Gparsing command line arguments of '-a one -b two' would result in ;TI"F'one', '-b', 'two' being left in ARGV, and only ('-a', '') being ;TI"%processed as an option/arg pair.;T@o;
; [I"?This is the default ordering, if the environment variable ;TI"NPOSIXLY_CORRECT is set. (This is for compatibility with GNU getopt_long.);T@o;
; [I"PERMUTE :;T@o;
; [I"HOptions can occur anywhere in the command line parsed. This is the ;TI"default behavior.;T@o;
; [I"LEvery sequence of words which can be interpreted as an option (with or ;TI"Mwithout argument) is treated as an option; non-option words are skipped.;T@o;
; [ I"MFor example, if -a does not require an argument and -b optionally takes ;TI"Nan argument, parsing '-a one -b two three' would result in ('-a','') and ;TI"J('-b', 'two') being processed as option/arg pairs, and 'one','three' ;TI"being left in ARGV.;T@o;
; [I"DIf the ordering is set to PERMUTE but the environment variable ;TI"HPOSIXLY_CORRECT is set, REQUIRE_ORDER is used instead. This is for ;TI"(compatibility with GNU getopt_long.;T@o;
; [I"RETURN_IN_ORDER :;T@o;
; [I"GAll words on the command line are processed as options. Words not ;TI"Epreceded by a short or long option flag are passed as arguments ;TI")with an option of '' (empty string).;T@o;
; [I"MFor example, if -a requires an argument but -b does not, a command line ;TI"Pof '-a one -b two three' would result in option/arg pairs of ('-a', 'one') ;TI"<('-b', ''), ('', 'two'), ('', 'three') being processed.;T:
@fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(ordering);T@KFI"GetoptLong;TcRDoc::NormalClass00 error-i.ri 0000644 00000000466 15236466367 0006507 0 ustar 00 U:RDoc::Attr[iI"
error:ETI"GetoptLong#error;TI"R;T:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"4Examine whether an option processing is failed.;T:
@fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below0F@I"GetoptLong;TcRDoc::NormalClass0 set_error-i.ri 0000644 00000000513 15236466367 0007353 0 ustar 00 U:RDoc::AnyMethod[iI"set_error:ETI"GetoptLong#set_error;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"(\Set an error (a protected method).;T:
@fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(type, message);T@FI"GetoptLong;TcRDoc::NormalClass00 error_message-i.ri 0000644 00000000616 15236466367 0010210 0 ustar 00 U:RDoc::AnyMethod[iI"error_message:ETI"GetoptLong#error_message;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"CReturn the appropriate error message in POSIX-defined format. ;TI"+If no error has occurred, returns nil.;T:
@fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"GetoptLong;TcRDoc::NormalClass00 cdesc-GetoptLong.ri 0000644 00000006160 15236466367 0010266 0 ustar 00 U:RDoc::NormalClass[iI"GetoptLong:ET@I"Object;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I"PThe GetoptLong class allows you to parse command line options similarly to ;TI"Othe GNU getopt_long() C library call. Note, however, that GetoptLong is a ;TI"pure Ruby implementation.;To:RDoc::Markup::BlankLine o; ;[I"LGetoptLong allows for POSIX-style options like --file as well ;TI".as single letter options like -f;T@o; ;[I"LThe empty option -- (two minus symbols) is used to end option ;TI"Mprocessing. This can be particularly important if options have optional ;TI"arguments.;T@o; ;[I"'Here is a simple example of usage:;T@o:RDoc::Markup::Verbatim;[;I"require 'getoptlong'
;TI"
;TI"opts = GetoptLong.new(
;TI"4 [ '--help', '-h', GetoptLong::NO_ARGUMENT ],
;TI"< [ '--repeat', '-n', GetoptLong::REQUIRED_ARGUMENT ],
;TI"3 [ '--name', GetoptLong::OPTIONAL_ARGUMENT ]
;TI")
;TI"
;TI"dir = nil
;TI"name = nil
;TI"repetitions = 1
;TI"opts.each do |opt, arg|
;TI" case opt
;TI" when '--help'
;TI" puts <<-EOF
;TI"hello [OPTION] ... DIR
;TI"
;TI"-h, --help:
;TI" show help
;TI"
;TI"--repeat x, -n x:
;TI" repeat x times
;TI"
;TI"--name [name]:
;TI"A greet user by name, if name not supplied default is John
;TI"
;TI"8DIR: The directory in which to issue the greeting.
;TI" EOF
;TI" when '--repeat'
;TI"" repetitions = arg.to_i
;TI" when '--name'
;TI" if arg == ''
;TI" name = 'John'
;TI" else
;TI" name = arg
;TI" end
;TI" end
;TI" end
;TI"
;TI"if ARGV.length != 1
;TI"0 puts "Missing dir argument (try --help)"
;TI" exit 0
;TI" end
;TI"
;TI"dir = ARGV.shift
;TI"
;TI"Dir.chdir(dir)
;TI"for i in (1..repetitions)
;TI" print "Hello"
;TI" if name
;TI" print ", #{name}"
;TI" end
;TI" puts
;TI" end
;T:@format0o; ;[I"Example command line:;T@o;;[I"hello -n 6 --name -- /tmp;T;0:
@fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below0;
0;0[
[
I"
error;TI"R;T:privateFI"lib/getoptlong.rb;T[
I"error?;T@a;F@b[
I"
ordering;T@a;F@b[
I"
quiet;TI"RW;T;F@b[
I"quiet?;T@i;F@b[ U:RDoc::Constant[i I"VERSION;TI"GetoptLong::VERSION;T:public0o;;[o; ;[I"
Version.;T;
@];0@]@cRDoc::NormalClass0U;[i I"ORDERINGS;TI"GetoptLong::ORDERINGS;T;0o;;[o; ;[I"Orderings.;T;
@];0@]@@v0U;[i I"ARGUMENT_FLAGS;TI"GetoptLong::ARGUMENT_FLAGS;T;0o;;[o; ;[I"Argument flags.;T;
@];0@]@@v0U;[i I"STATUS_TERMINATED;TI""GetoptLong::STATUS_TERMINATED;T;0o;;[ ;
@];0@]@@v0[ [[I"
class;T[[;[ [:protected[ [;[[I"new;T@b[I"
instance;T[[;[ [;[ [;[[I" each;T@b[I"each_option;T@b[I"error_message;T@b[I"get;T@b[I"get_option;T@b[I"ordering=;T@b[I"set_error;T@b[I"set_options;T@b[I"terminate;T@b[I"terminated?;T@b[ [U:RDoc::Context::Section[i 0o;;[ ;
0;0[I"lib/getoptlong.rb;T@]cRDoc::TopLevel each_option-i.ri 0000644 00000000522 15236466367 0007637 0 ustar 00 U:RDoc::AnyMethod[iI"each_option:ETI"GetoptLong#each_option;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I")`each_option' is an alias of `each'.;T:
@fileI"lib/getoptlong.rb;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"GetoptLong;TcRDoc::NormalClass0[@FI" each;T each-i.ri 0000644 00000001417 15236466367 0006253 0 ustar 00 U:RDoc::AnyMethod[iI" each:ETI"GetoptLong#each;TF:privateo:RDoc::Markup::Document:@parts[
o:RDoc::Markup::Paragraph; [I"Iterator version of `get'.;To:RDoc::Markup::BlankLine o;
; [ I"8The block is called repeatedly with two arguments: ;TI"#The first is the option name. ;TI"