summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorLee Jarvis <lee@jarvis.co>2011-04-12 22:09:57 +0100
committerLee Jarvis <lee@jarvis.co>2011-04-12 22:09:57 +0100
commitea24bddcc68e1983ecea612aaad33d8d6a9ad802 (patch)
tree844bc7fd85fc205f875731b29ac51d7c8036807a /README.md
parentf8c705619de72257a61134fdbe6c724b5f7835e5 (diff)
downloadslop-ea24bddcc68e1983ecea612aaad33d8d6a9ad802.tar.gz
simplify optparse comparison example
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index 4787493..34c9721 100644
--- a/README.md
+++ b/README.md
@@ -323,7 +323,7 @@ gather a bunch of key/value options, usually you would do something like this:
end
opt.parse
- # do something with things
+ things #=> { :name => 'lee', :age => 105 }
Which is all great and stuff, but it can lead to some repetition, the same
thing in Slop:
@@ -335,4 +335,4 @@ thing in Slop:
on :a, :age, 'Your age', true
end
- things = opts.to_hash \ No newline at end of file
+ slop.to_hash(true) #=> { :name => 'lee', :age => 105 } \ No newline at end of file