diff options
Diffstat (limited to 'doc/tutorial/long_names.rb')
-rw-r--r-- | doc/tutorial/long_names.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/tutorial/long_names.rb b/doc/tutorial/long_names.rb new file mode 100644 index 0000000000..a34b3382c2 --- /dev/null +++ b/doc/tutorial/long_names.rb @@ -0,0 +1,9 @@ +require 'optparse' +parser = OptionParser.new +parser.on('--xxx') do |value| + p ['-xxx', value] +end +parser.on('--y1%', '--z2#') do |value| + p ['--y1% or --z2#', value] +end +parser.parse! |