summaryrefslogtreecommitdiff
path: root/sample/getoptlong/simple.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/getoptlong/simple.rb')
-rw-r--r--sample/getoptlong/simple.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/sample/getoptlong/simple.rb b/sample/getoptlong/simple.rb
new file mode 100644
index 0000000000..1af6447632
--- /dev/null
+++ b/sample/getoptlong/simple.rb
@@ -0,0 +1,7 @@
+require 'getoptlong'
+
+options = GetoptLong.new(
+ ['--number', '-n', GetoptLong::REQUIRED_ARGUMENT],
+ ['--verbose', '-v', GetoptLong::OPTIONAL_ARGUMENT],
+ ['--help', '-h', GetoptLong::NO_ARGUMENT]
+)