1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/optparse] More on tutorial (#9)

* More on tutorial: clearer example output

84dfd92d2a
This commit is contained in:
Burdette Lamar 2021-04-06 13:55:21 -05:00 committed by Nobuyoshi Nakada
parent 2b66b22479
commit fe72cff487
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
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', '--yyy [YYY]') do |value|
p ['--yyy', value]
end
parser.parse!