summaryrefslogtreecommitdiff
path: root/doc/creates_option.rdoc
diff options
context:
space:
mode:
authorBurdetteLamar <burdettelamar@yahoo.com>2021-04-07 11:58:46 -0500
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-04-08 12:11:42 +0900
commita5ecce9187a275497895eca3fdb080ca60297931 (patch)
tree89d6a96db17c25c42cafe0d0444676938337faaa /doc/creates_option.rdoc
parent5891159f9608f058b3fb2ba96a9874fc81f3d7b3 (diff)
[ruby/optparse] Make use of option_params.rdoc
https://github.com/ruby/optparse/commit/d55d9284c3
Diffstat (limited to 'doc/creates_option.rdoc')
-rw-r--r--doc/creates_option.rdoc7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/creates_option.rdoc b/doc/creates_option.rdoc
new file mode 100644
index 0000000000..d006706382
--- /dev/null
+++ b/doc/creates_option.rdoc
@@ -0,0 +1,7 @@
+Creates an option from the given parameters +params+.
+See {Parameters for New Options}[doc/option_params/option_params_rdoc.html].
+
+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}[doc/option_params/option_params_rdoc.html#label-Option+Handlers].