diff options
author | Lee Jarvis <ljjarvis@gmail.com> | 2013-01-08 12:17:26 +0000 |
---|---|---|
committer | Lee Jarvis <ljjarvis@gmail.com> | 2013-01-08 12:17:26 +0000 |
commit | 23fbb4fa00abc4e2aad453194f802b4c78bc2cff (patch) | |
tree | 03c431e8ea45b9f03517dc07916539b51f02cebc /README.md | |
parent | 19e946c37c62e6bb2dc6ec0b44588fcf7c01f72a (diff) | |
download | slop-23fbb4fa00abc4e2aad453194f802b4c78bc2cff.tar.gz |
fix commands example
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -122,7 +122,7 @@ opts = Slop.parse do end command 'add' do - on :v, :verbose, 'Enable verbose more' + on :v, :verbose, 'Enable verbose mode' on :name, 'Your name' run do |opts, args| @@ -133,7 +133,7 @@ end # ruby run.rb -v #=> Version 1.0 -# ruby add -v foo --name Lee +# ruby run.rb add -v foo --name Lee #=> You ran 'add' with options {:verbose=>true,:name=>"Lee"} and args ["foo"] opts.to_hash(true) # Pass true to tell Slop to merge sub-command option values. # => { :v => nil, :add => { :v => true, :name => "Lee" } } |