summaryrefslogtreecommitdiff
path: root/sample/getoptlong/abbrev.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/getoptlong/abbrev.rb')
-rw-r--r--sample/getoptlong/abbrev.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/sample/getoptlong/abbrev.rb b/sample/getoptlong/abbrev.rb
new file mode 100644
index 0000000000..9b89863626
--- /dev/null
+++ b/sample/getoptlong/abbrev.rb
@@ -0,0 +1,9 @@
+require 'getoptlong'
+
+options = GetoptLong.new(
+ ['--xxx', GetoptLong::NO_ARGUMENT],
+ ['--xyz', GetoptLong::NO_ARGUMENT]
+)
+options.each do |option, argument|
+ p [option, argument]
+end