method

rewind

v1_8_6_287 - Show latest stable - Class: IO
rewind()
public

Positions ios to the beginning of input, resetting lineno to zero.

   f = File.new("testfile")
   f.readline   #=> "This is line one\n"
   f.rewind     #=> 0
   f.lineno     #=> 0
   f.readline   #=> "This is line one\n"