Class Getopt::Declare::Arg
In: lib/Getopt/Declare.rb
Parent: Object

Class used to handle other arguments (flags, etc)

Methods

besthelp   bestversion   clear   code   foundid   helppat   name   negflagpat   new   posflagpat   versionpat  

Constants

Helpcmd = %w( -help --help -Help --Help -HELP --HELP -h -H )
Versioncmd = %w( -version --version -Version --Version -VERSION --VERSION -v -V )

Attributes

actions  [RW] 
args  [RW] 
desc  [RW] 
ditto  [RW] 
flag  [RW] 
id  [RW] 
nocase  [RW] 
repeatable  [RW] 
required  [RW] 
requires  [RW] 

Public Class methods

Create regex of help flags based on help shortcuts left

Return string with regex that avoids all flags in declaration

Return string with regex that matches any of the flags in declaration

Create regex of version flags based on help shortcuts left

Public Instance methods

Return String with code to parse this argument (ie. flag)

Return foundid of argument, which can be flag’s name or variable’s name

Return name of argument, which can be flag’s name or variable’s name

[Validate]