diff options
author | Burdette Lamar <BurdetteLamar@Yahoo.com> | 2021-04-07 09:01:52 -0500 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-07-28 20:13:38 +0900 |
commit | a4631a427367766517c8920d323dcd96a835b06c (patch) | |
tree | 0b6f855d6155c46c5dfc1ea3940dcda5e3e39d40 /doc/option_params/array.rb | |
parent | 05e9efa323eb99727b099590c1d40d23f38443ef (diff) |
[ruby/optparse] Enhanced doc for option parameters (https://github.com/ruby/optparse/pull/11)
https://github.com/ruby/optparse/commit/5618eeb49e
Diffstat (limited to 'doc/option_params/array.rb')
-rw-r--r-- | doc/option_params/array.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/option_params/array.rb b/doc/option_params/array.rb new file mode 100644 index 0000000000..7c6c14fad4 --- /dev/null +++ b/doc/option_params/array.rb @@ -0,0 +1,6 @@ +require 'optparse' +parser = OptionParser.new +parser.on('--array=ARRAY', Array) do |value| + p [value, value.class] +end +parser.parse! |