diff options
author | Nobuyoshi Nakada <[email protected]> | 2021-04-16 12:57:55 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2021-07-28 20:13:39 +0900 |
commit | a10db32003320a81c32a3733d9d97ba6e3614efa (patch) | |
tree | 822cd46a34e84034ffda979abd9f5abc0401645a /doc/optparse/tutorial.rdoc | |
parent | 98ccb49ac3bea0e2233d2b3f642a3e0579801988 (diff) |
[ruby/optparse] Removed a duplicate section
https://github.com/ruby/optparse/commit/7ef3d89e78
Diffstat (limited to 'doc/optparse/tutorial.rdoc')
-rw-r--r-- | doc/optparse/tutorial.rdoc | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/doc/optparse/tutorial.rdoc b/doc/optparse/tutorial.rdoc index dfdc244fe2..8b17726658 100644 --- a/doc/optparse/tutorial.rdoc +++ b/doc/optparse/tutorial.rdoc @@ -94,42 +94,6 @@ Executions: ["y", true] ["x", true] -=== To Begin With - -To use \OptionParser: - -1. Require the \OptionParser code. -2. Create an \OptionParser object. -3. Define one or more options. -4. Parse the command line. - -File +basic.rb+ defines three options, <tt>-x</tt>, -<tt>-y</tt>, and <tt>-z</tt>, each with a descriptive string, -and each with a block. - - :include: ruby/basic.rb - -From these defined options, the parser automatically builds help text: - - $ ruby basic.rb --help - Usage: basic [options] - -x Whether to X - -y Whether to Y - -z Whether to Z - -When an option is found during parsing, -the block defined for the option is called with the argument value. - -Executions: - - $ ruby basic.rb -x -z - ["x", true] - ["z", true] - $ ruby basic.rb -z -y -x - ["z", true] - ["y", true] - ["x", true] - === Defining Options A common way to define an option in \OptionParser |