Loads options from file names as filename
. Does nothing when the file is not present. Returns whether successfully loaded.
filename
defaults to basename of the program without suffix in a directory ~/.options.
Terminates option parsing. Optional parameter arg
is a string pushed back to be the first non-option argument.
Heading banner preceding summary.
Version
Returns version string from program_name
, version and release.
Parses command line arguments argv
in order. When a block is given, each non-option argument is yielded.
Returns the rest of argv
left unparsed.
Same as order
, but removes switches destructively. Non-option arguments remain in argv
.
Parses command line arguments argv
in permutation mode and returns list of non-option arguments.
Same as permute
, but removes switches destructively. Non-option arguments remain in argv
.
Wrapper method for getopts.rb.
params = ARGV.getopts("ab:", "foo", "bar:", "zot:Z;zot option) # params[:a] = true # -a # params[:b] = "1" # -b1 # params[:foo] = "1" # --foo # params[:bar] = "x" # --bar x # params[:zot] = "z" # --zot Z
See getopts
.
Loads options from file names as filename
. Does nothing when the file is not present. Returns whether successfully loaded.
filename
defaults to basename of the program without suffix in a directory ~/.options.
As int
is already an Integer
, all these methods simply return the receiver.
Returns self.
Looks up the first IP address for name
.
Looks up all IP address for name
.
Looks up the hostname of address
.
Looks up all hostnames for address
.
Looks up the first IP address for name
.
Looks up all IP address for name
.
Looks up the hostname of address
.
Looks up all hostnames for address
.