method

file

Importance_1
v1_9_2_180 - Show latest stable - 0 notes - Class: ARGF
file() public

Returns the current file as an IO or File object. #> 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>
Show source
Register or log in to add new notes.