method

pos

v1_9_1_378 - Show latest stable - Class: IO
pos()
public

Returns the current offset (in bytes) of ios.

f = File.new("testfile")
f.pos    #=> 0
f.gets   #=> "This is line one\n"
f.pos    #=> 17