diff options
author | Lee Jarvis <lee@jarvis.co> | 2011-04-12 22:09:57 +0100 |
---|---|---|
committer | Lee Jarvis <lee@jarvis.co> | 2011-04-12 22:09:57 +0100 |
commit | ea24bddcc68e1983ecea612aaad33d8d6a9ad802 (patch) | |
tree | 844bc7fd85fc205f875731b29ac51d7c8036807a /README.md | |
parent | f8c705619de72257a61134fdbe6c724b5f7835e5 (diff) | |
download | slop-ea24bddcc68e1983ecea612aaad33d8d6a9ad802.tar.gz |
simplify optparse comparison example
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |