diff options
author | Lee Jarvis <lee@jarvis.co> | 2011-06-08 15:24:43 +0100 |
---|---|---|
committer | Lee Jarvis <lee@jarvis.co> | 2011-06-08 15:24:43 +0100 |
commit | 11fab5f73f99b49a403531c25134bcc1caff48e9 (patch) | |
tree | ad84d1d5cfe5df96e803ac0dc93c4ce40f75c3bf /README.md | |
parent | f8765aa3e14c2004e70b395c63a26963084c5c2e (diff) | |
download | slop-11fab5f73f99b49a403531c25134bcc1caff48e9.tar.gz |
remove commands example from readme, add link to wiki
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 21 |
1 files changed, 1 insertions, 20 deletions
@@ -224,26 +224,6 @@ Slop will look to see if the `foo` command exists, and if it does, it'll pass the options `['--bar', 'baz']` to the instance of Slop that belongs to `foo`. Here's how commands might look: - opts = Slop.new do - command :foo do - on :b, :bar, 'something', true - end - - command :clean do - on :v, :verbose, do - puts 'Enabled verbose mode for clean' - end - end - - # non-command specific options - on :v, :version do - puts 'version 1' - end - end - -* `run.rb -v #=> version 1` -* `run.rb clean -v #=> Enabled verbose mode for clean` - Features -------- @@ -251,6 +231,7 @@ Check out the following wiki pages for more features: * [Ranges](https://github.com/injekt/slop/wiki/Ranges) * [Auto Create](https://github.com/injekt/slop/wiki/Auto-Create) +* [Commands](https://github.com/injekt/slop/wiki/Commands) Woah woah, why you hating on OptionParser? ------------------------------------------ |