oflush

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

nread

io.nread â int Instance Public methods Returns number of bytes that can be read without blocking. Returns zero if no information available.

noecho

io.noecho {|io| } Instance Public methods Yields self with disabling echo back. STDIN.noecho(&:gets) will read and return a line without echo back. You must require 'io/console' to use this method.

lines

lines(*args) Instance Public methods This is a deprecated alias for each_line.

lineno=

ios.lineno = integer â integer Instance Public methods Manually sets the current line number to the given value. $. is updated only on the next read. f = File.new("testfile") f.gets #=> "This is line one\n" $. #=> 1 f.lineno = 1000 f.lineno #=> 1000 $. #=> 1 # lineno of last read f.gets #=> "This is line two\n" $. #=> 1001

lineno

ios.lineno â integer Instance Public methods Returns the current line number in ios. The stream must be opened for reading. lineno counts the number of times gets is called rather than the number of newlines encountered. The two values will differ if gets is called with a separator other than newline. Methods that use $/ like each, lines and readline will also increment lineno. See also the $. variable. f = File.new("testfile") f.lineno #=> 0 f.gets #=> "This is l

isatty

ios.isatty â 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

ioflush

io.ioflush Instance Public methods Flushes input and output buffers in kernel. You must require 'io/console' to use this method.

ioctl

ios.ioctl(integer_cmd, arg) â integer Instance Public methods Provides a mechanism for issuing low-level commands to control or query I/O devices. Arguments and results are platform dependent. If arg is a number, its value is passed directly. If it is a string, it is interpreted as a binary sequence of bytes. On Unix platforms, see ioctl(2) for details. Not implemented on all platforms.

internal_encoding

io.internal_encoding â encoding Instance Public methods Returns the Encoding of the internal string if conversion is specified. Otherwise returns nil.