tell

ios.tell â integer Instance Public methods 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

to_i

to_i() Instance Public methods Alias for: fileno

to_io

ios.to_io â ios Instance Public methods Returns ios.

tty?

ios.tty? â true or false Instance Public methods Returns true if ios is associated with a terminal device (tty), false otherwise. File.new("testfile").isatty #=> false File.new("/dev/tty").isatty #=> true

ungetbyte

ios.ungetbyte(string) â nilios.ungetbyte(integer) â nil Instance Public methods Pushes back bytes (passed as a parameter) onto ios, such that a subsequent buffered read will return it. Only one byte may be pushed back before a subsequent read operation (that is, you will be able to read only the last of several bytes that have been pushed back). Has no effect with unbuffered reads (such as IO#sysread). f = File.new("testfile") #=> #<File:testfile> b = f.getbyte

ungetc

ios.ungetc(string) â nil Instance Public methods Pushes back one character (passed as a parameter) onto ios, such that a subsequent buffered character read will return it. Only one character may be pushed back before a subsequent read operation (that is, you will be able to read only the last of several characters that have been pushed back). Has no effect with unbuffered reads (such as IO#sysread). f = File.new("testfile") #=> #<File:testfile> c = f.getc

wait

io.wait â IO, true, false or nilio.wait(timeout) â IO, true, false or nil Instance Public methods Waits until input is available or times out and returns self or nil when EOF is reached.

wait_readable

io.wait â IO, true, false or nilio.wait(timeout) â IO, true, false or nil Instance Public methods Waits until input is available or times out and returns self or nil when EOF is reached.

wait_writable

io.wait_writable â IOio.wait_writable(timeout) â IO or nil Instance Public methods Waits until IO writable is available or times out and returns self or nil when EOF is reached.

winsize

io.winsize â [rows, columns] Instance Public methods Returns console size. You must require 'io/console' to use this method.