inspect

ios.inspect â string Instance Public methods Return a string describing this IO object.

iflush

io.iflush Instance Public methods Flushes input buffer in kernel. You must require 'io/console' to use this method.

gets

ios.gets(sep=$/) â string or nilios.gets(limit) â string or nilios.gets(sep, limit) â string or nil Instance Public methods Reads the next âline'' from the I/O stream; lines are separated by sep. A separator of nil reads the entire contents, and a zero-length separator reads the input a paragraph at a time (two successive newlines in the input separate paragraphs). The stream must be opened for reading or an IOError will be raised. The line read in will be returned and al

getch

io.getch(min: nil, time: nil) â char Instance Public methods Reads and returns a character in raw mode. You must require 'io/console' to use this method.

getc

ios.getc â string or nil Instance Public methods Reads a one-character string from ios. Returns nil if called at end of file. f = File.new("testfile") f.getc #=> "h" f.getc #=> "e"

getbyte

ios.getbyte â fixnum or nil Instance Public methods Gets the next 8-bit byte (0..255) from ios. Returns nil if called at end of file. f = File.new("testfile") f.getbyte #=> 84 f.getbyte #=> 104

fsync

ios.fsync â 0 or nil Instance Public methods Immediately writes all buffered data in ios to disk. Note that fsync differs from using IO#sync=. The latter ensures that data is flushed from Ruby's buffers, but does not guarantee that the underlying operating system actually writes it to disk. NotImplementedError is raised if the underlying operating system does not support fsync(2).

flush

ios.flush â ios Instance Public methods Flushes any buffered data within ios to the underlying operating system (note that this is Ruby internal buffering only; the OS may buffer the data as well). $stdout.print "no newline" $stdout.flush produces: no newline

fileno

ios.fileno â fixnumios.to_i â fixnum Instance Public methods Returns an integer representing the numeric file descriptor for ios. $stdin.fileno #=> 0 $stdout.fileno #=> 1 to_i

fdatasync

ios.fdatasync â 0 or nil Instance Public methods Immediately writes all buffered data in ios to disk. If the underlying operating system does not support fdatasync(2), IO#fsync is called instead (which might raise a NotImplementedError).