[ruby/optparse] More on tutorial (https://github.com/ruby/optparse/pull/9)

* More on tutorial

* More on tutorial

* More on tutorial

* More on tutorial: clearer example output

84dfd92d2a
This commit is contained in:
Burdette Lamar 2021-04-06 13:55:21 -05:00 committed by Hiroshi SHIBATA
parent 8844eba488
commit 05e9efa323
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2
10 changed files with 133 additions and 54 deletions

View file

@ -0,0 +1,9 @@
require 'optparse'
parser = OptionParser.new
parser.on('-x XXX', '--xxx') do |value|
p ['--xxx', value]
end
parser.on('-y', '--y YYY') do |value|
p ['--yyy', value]
end
parser.parse!