Puts option summary into to
and returns to
. Yields each line if a block is given.
to
Output destination, which must have method <<. Defaults to [].
width
Width of left side, defaults to @summary_width.
max
Maximum length allowed for left side, defaults to width
- 1.
indent
Indentation, defaults to @summary_indent.
Add separator in summary.
Searches key
in @stack for id
hash and returns or yields the result.
Parses environment variable env
or its uppercase with splitting like a shell.
env
defaults to the basename of the program.
Terminates option parsing. Optional parameter arg
is a string pushed back to be the first non-option argument.
Puts option summary into to
and returns to
. Yields each line if a block is given.
to
Output destination, which must have method <<. Defaults to [].
width
Width of left side, defaults to @summary_width.
max
Maximum length allowed for left side, defaults to width
- 1.
indent
Indentation, defaults to @summary_indent.
Add separator in summary.
Searches key
in @stack for id
hash and returns or yields the result.
Parses environment variable env
or its uppercase with splitting like a shell.
env
defaults to the basename of the program.
Iterates the given block over all prime numbers.
ubound
Optional. An arbitrary positive number. The upper bound of enumeration. The method enumerates prime numbers infinitely if ubound
is nil.
generator
Optional. An implementation of pseudo-prime generator.
An evaluated value of the given block at the last time. Or an enumerator which is compatible to an Enumerator
if no block given.
Calls block
once for each prime number, passing the prime as a parameter.
ubound
Upper bound of prime numbers. The iterator stops after it yields all prime numbers p <= ubound
.
Returns the path to the data store file.
Returns a string containing the character represented by the int
‘s value according to encoding
.
65.chr #=> "A" 230.chr #=> "\346" 255.chr(Encoding::UTF_8) #=> "\303\277"
As int
is already an Integer
, all these methods simply return the receiver.
Returns self.
Returns 1.
Returns the value as a rational. The optional argument eps is always ignored.
Returns a new set that is a copy of the set, flattening each containing set recursively.
Equivalent to Set#flatten
, but replaces the receiver with the result in place. Returns nil if no modifications were made.
Calls the given block once for each element in the set, passing the element as parameter. Returns an enumerator if no block is given.
Creates a Shell
object which current directory is set to path
.
If a block is given, it restores the current directory when the block ends.
If called as iterator, it restores the current directory when the block ends.
Returns the full path name of the temporary file. This will be nil if unlink
has been called.