method
file
ruby latest stable - Class:
ARGF
file()public
Returns the current file as an IO or File object. $stdin is returned when the current file is STDIN.
For example:
$ echo "foo" > foo $ echo "bar" > bar $ ruby argf.rb foo bar ARGF .file #=> #<File:foo> ARGF .read (5) #=> "foo\nb" ARGF .file #=> #<File:bar>
static VALUE
argf_file(VALUE argf)
{
next_argv();
return ARGF.current_file;
}