aboutsummaryrefslogtreecommitdiffstats
path: root/doc/tutorial/mixed_names.rb
diff options
context:
space:
mode:
Diffstat (limited to 'doc/tutorial/mixed_names.rb')
-rw-r--r--doc/tutorial/mixed_names.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/tutorial/mixed_names.rb b/doc/tutorial/mixed_names.rb
new file mode 100644
index 0000000000..e886049821
--- /dev/null
+++ b/doc/tutorial/mixed_names.rb
@@ -0,0 +1,9 @@
+require 'optparse'
+parser = OptionParser.new
+parser.on('-x', '--xxx') do |value|
+ p ['--xxx', value]
+end
+parser.on('-y', '--y1%') do |value|
+ p ['--y1%', value]
+end
+parser.parse!