diff options
author | Lee Jarvis <ljjarvis@gmail.com> | 2015-06-25 08:40:59 +0100 |
---|---|---|
committer | Lee Jarvis <ljjarvis@gmail.com> | 2015-06-25 08:40:59 +0100 |
commit | 045f807670ef3d8caead25b36d7f5de5ef2374cf (patch) | |
tree | 3a604f9f3f1dcf515fabb6a85891ae2c7339b6fa | |
parent | b197bf93641525f84ef11417002d283f3f1702f7 (diff) | |
parent | 659d6fcaf343b65dd3208b3f6dedf447a5733852 (diff) | |
download | slop-045f807670ef3d8caead25b36d7f5de5ef2374cf.tar.gz |
Merge pull request #173 from rickhull/master
add ARGF notes to Arguments
-rw-r--r-- | README.md | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -101,6 +101,21 @@ end p opts.arguments #=> ["connect", "GET"] # also aliased to `args` ``` +This is particularly useful when writing scripts with `ARGF`: + +```ruby +opts = Slop.parse do |blah| + # ... +end + +# make sure sloptions aren't consumed by ARGF +ARGV.replace opts.arguments + +ARGF.each { |line| + # ... +} +``` + Arrays ------ |