path

ARGF.path â String
Instance Public methods

Returns the current filename. â-â is returned when the current file is STDIN.

For example:

$ echo "foo" > foo
$ echo "bar" > bar
$ echo "glark" > glark

$ ruby argf.rb foo bar glark

ARGF.filename  #=> "foo"
ARGF.read(5)   #=> "foo\nb"
ARGF.filename  #=> "bar"
ARGF.skip
ARGF.filename  #=> "glark"
doc_ruby_on_rails
2015-03-30 12:12:44
Comments
Leave a Comment

Please login to continue.