Flowdock
method

lineno=

Importance_1
Ruby latest stable (v1_9_3_392) - 0 notes - Class: ARGF
lineno=(p1) public

Sets the line number of ARGF as a whole to the given Integer.

ARGF sets the line number automatically as you read data, so normally you will not need to set it explicitly. To access the current line number use ARGF.lineno.

For example:

ARGF.lineno      #=> 0
ARGF.readline    #=> "This is line 1\n"
ARGF.lineno      #=> 1
ARGF.lineno = 0  #=> nil
ARGF.lineno      #=> 0
Show source
Register or log in to add new notes.