ARGF is a stream designed for use in
scripts that process files given as command-line arguments or passed in via
STDIN.
The arguments passed to your script are stored in the ARGV Array, one argument per element. ARGF assumes that any arguments that aren’t
filenames have been removed from ARGV. For example:
$ ruby argf.rb --verbose file1 file2 ARGV #=> ["--verbose", "file1", "file2"] option = ARGV.shift #=> "--verbose" ARGV #=> ["file1", "file2"]
http://www.ruby-doc.org/core-1.9.3/ARGF.html
0 komentar:
Posting Komentar