summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorLee Jarvis <ljjarvis@gmail.com>2014-12-17 08:35:58 +0000
committerLee Jarvis <ljjarvis@gmail.com>2014-12-17 08:35:58 +0000
commit4721ef271eec40aa45b4452efdff824a05bce032 (patch)
tree87ed6a8788fa351e3a169604f2b15c28043ce1d1 /README.md
parentf77101e3fef89fd70ae0db3708ce623b7d8d32c1 (diff)
downloadslop-4721ef271eec40aa45b4452efdff824a05bce032.tar.gz
Add "on" example to readme
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/README.md b/README.md
index 747c402..66889e3 100644
--- a/README.md
+++ b/README.md
@@ -19,6 +19,10 @@ opts = Slop.parse do |o|
o.integer '--port', 'custom port', default: 80
o.bool '-v', '--verbose', 'enable verbose mode'
o.bool '-q', '--quiet', 'surpress output (quiet mode)'
+ o.on '--version', 'print the version' do
+ puts Slop::VERSION
+ exit
+ end
end
ARGV #=> -v --host 192.168.0.1