bytes

bytes() Instance Public methods This is a deprecated alias for each_byte.

chars

chars() Instance Public methods This is a deprecated alias for each_char.

close

ARGF.close â ARGF Instance Public methods Closes the current file and skips to the next in the stream. Trying to close a file that has already been closed causes an +IOError+ to be raised. For example: $ ruby argf.rb foo bar ARGF.filename #=> "foo" ARGF.close ARGF.filename #=> "bar" ARGF.close ARGF.close #=> closed stream (IOError)

closed?

ARGF.closed? â true or false Instance Public methods Returns true if the current file has been closed; false otherwise. Use ARGF.close to actually close the current file.

codepoints

codepoints() Instance Public methods This is a deprecated alias for each_codepoint.

each

ARGF.each(sep=$/) {|line| block } â ARGFARGF.each(sep=$/,limit) {|line| block } â ARGFARGF.each(...) â an_enumeratorARGF.each_line(sep=$/) {|line| block } â ARGFARGF.each_line(sep=$/,limit) {|line| block } â ARGFARGF.each_line(...) â an_enumerator Instance Public methods Returns an enumerator which iterates over each line (separated by sep, which defaults to your platform's newline character) of each

each_byte

ARGF.bytes {|byte| block } â ARGFARGF.bytes â an_enumeratorARGF.each_byte {|byte| block } â ARGFARGF.each_byte â an_enumerator Instance Public methods Iterates over each byte of each file in +ARGV+. A byte is returned as a +Fixnum+ in the range 0..255. This method allows you to treat the files supplied on the command line as a single file consisting of the concatenation of each named file. After the last byte of the first file has been

each_char

ARGF.each_char {|char| block } â ARGFARGF.each_char â an_enumerator Instance Public methods Iterates over each character of each file in ARGF. This method allows you to treat the files supplied on the command line as a single file consisting of the concatenation of each named file. After the last character of the first file has been returned, the first character of the second file is returned. The ARGF.filename method can be used to determine the name of the fi

each_codepoint

ARGF.each_codepoint {|codepoint| block } â ARGFARGF.each_codepoint â an_enumerator Instance Public methods Iterates over each codepoint of each file in ARGF. This method allows you to treat the files supplied on the command line as a single file consisting of the concatenation of each named file. After the last codepoint of the first file has been returned, the first codepoint of the second file is returned. The ARGF.filename method can be used to determine the

each_line

ARGF.each_line(sep=$/) {|line| block } â ARGFARGF.each_line(sep=$/,limit) {|line| block } â ARGFARGF.each_line(...) â an_enumerator Instance Public methods Returns an enumerator which iterates over each line (separated by sep, which defaults to your platform's newline character) of each file in ARGV. If a block is supplied, each line in turn will be yielded to the block, otherwise an enumerator is returned. The optional limit argument is a Fixnum s