summaryrefslogtreecommitdiff
path: root/doc/optparse/creates_option.rdoc
blob: ad52c6671be0ac051cdbe3260e0ccd6ae4f73a4b (plain)
1
2
3
4
5
6
7
Creates an option from the given parameters +params+.
See {Parameters for New Options}[./option_params.rdoc].

The block, if given, is the handler for the created option.
When the option is encountered during command-line parsing,
the block is called with the argument given for the option, if any.
See {Option Handlers}[./option_params.rdoc#label-Option+Handlers].