1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/doc/ruby/long_with_negation.rb
Burdette Lamar ff0dac1849 [ruby/optparse] Rdoc (#15)
* Resolve shared mixed_names.rb

* Add long option with negation

* Show --help for all examples

* Table of contents for tutorial

* Move argument converters to separate rdoc

* Add references to argument_converters.rdoc

* Tune up argument converters

* Change explicit links to auto-links

c91ed8d33d
2021-04-11 08:52:52 +09:00

6 lines
153 B
Ruby

require 'optparse'
parser = OptionParser.new
parser.on('--[no-]binary', 'Long name with negation') do |value|
p [value, value.class]
end
parser.parse!