diff options
author | Rick Hull <rick.hull@gmail.com> | 2015-06-23 19:52:40 -0700 |
---|---|---|
committer | Rick Hull <rick.hull@gmail.com> | 2015-06-23 19:53:54 -0700 |
commit | 659d6fcaf343b65dd3208b3f6dedf447a5733852 (patch) | |
tree | 3a604f9f3f1dcf515fabb6a85891ae2c7339b6fa /README.md | |
parent | b197bf93641525f84ef11417002d283f3f1702f7 (diff) | |
download | slop-659d6fcaf343b65dd3208b3f6dedf447a5733852.tar.gz |
add ARGF notes to Arguments
ci skip
Diffstat (limited to 'README.md')
-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 ------ |