From 626389f090d615f20993ddf5a436e940e7d72ccf Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Fri, 27 Oct 2017 22:49:52 -0400 Subject: README: Fix example to include required option --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 4d686ce..5c0142a 100644 --- a/README.md +++ b/README.md @@ -30,14 +30,15 @@ opts = Slop.parse do |o| end end -ARGV #=> -v --host 192.168.0.1 --check-ssl-certificate +ARGV #=> -v --login alice --host 192.168.0.1 --check-ssl-certificate opts[:host] #=> 192.168.0.1 +opts[:login] #=> alice opts.verbose? #=> true opts.quiet? #=> false opts.check_ssl_certificate? #=> true -opts.to_hash #=> { host: "192.168.0.1", port: 80, verbose: true, quiet: false, check_ssl_certificate: true } +opts.to_hash #=> { host: "192.168.0.1", login: "alice", port: 80, verbose: true, quiet: false, check_ssl_certificate: true } ``` Note that the block we've added to the `--version` flag will be executed -- cgit v1.2.1