summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorLee Jarvis <lee@jarvis.co>2011-04-03 13:01:25 +0100
committerLee Jarvis <lee@jarvis.co>2011-04-03 13:01:25 +0100
commite3abbe869e5af5cd507aac90fe9b6061c965390d (patch)
treec31e064141d816b8743df1f1835443fad1d3d53b /README.md
parentc92a74599b05e942c0711833a9bce31d02d43a27 (diff)
downloadslop-e3abbe869e5af5cd507aac90fe9b6061c965390d.tar.gz
attempt to fix whitespace
Diffstat (limited to 'README.md')
-rw-r--r--README.md30
1 files changed, 15 insertions, 15 deletions
diff --git a/README.md b/README.md
index fe58ba9..cb48660 100644
--- a/README.md
+++ b/README.md
@@ -129,12 +129,12 @@ Callbacks
If you'd like to trigger an event when an option is used, you can pass a
block to your option. Here's how:
- Slop.parse do
- on :V, :version, 'Print the version' do
- puts 'Version 1.0.0'
- exit
- end
- end
+ Slop.parse do
+ on :V, :version, 'Print the version' do
+ puts 'Version 1.0.0'
+ exit
+ end
+ end
Now when using the `--version` option on the command line, the trigger will
be called and its contents executed.
@@ -184,17 +184,17 @@ parse `-abcd` as the option `a` with the argument `bcd`, this can be disabled
by passing the `:multiple_switches` option to a new Slop object.
opts = Slop.new(:strict, :multiple_switches) do
- on :a, 'First switch'
- on :b, 'Second switch'
- on :c, 'Third switch'
- end
+ on :a, 'First switch'
+ on :b, 'Second switch'
+ on :c, 'Third switch'
+ end
- opts.parse
+ opts.parse
- # Using `-ac`
- opts[:a] #=> true
- opts[:b] #=> false
- opts[:c] #=> true
+ # Using `-ac`
+ opts[:a] #=> true
+ opts[:b] #=> false
+ opts[:c] #=> true
Ugh, Symbols
------------