summaryrefslogtreecommitdiff
path: root/doc/optparse/creates_option.rdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/optparse/creates_option.rdoc')
-rw-r--r--doc/optparse/creates_option.rdoc7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/optparse/creates_option.rdoc b/doc/optparse/creates_option.rdoc
new file mode 100644
index 0000000000..ab672d5124
--- /dev/null
+++ b/doc/optparse/creates_option.rdoc
@@ -0,0 +1,7 @@
+Creates an option from the given parameters +params+.
+See {Parameters for New Options}[optparse/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}[optparse/option_params.rdoc#label-Option+Handlers].