gets

gets(eol=$/, limit=nil) Instance Public methods Reads the next âline+ from the stream. Lines are separated by eol. If limit is provided the result will not be longer than the given number of bytes. eol may be a String or Regexp. Unlike IO#gets the line read will not be assigned to +$_+. Unlike IO#gets the separator must be provided if a limit is provided.

print

print(*args) Instance Public methods Writes args to the stream. See IO#print for full details.

printf

printf(s, *args) Instance Public methods Formats and writes to the stream converting parameters under control of the format string. See Kernel#sprintf for format string details.

puts

puts(*args) Instance Public methods Writes args to the stream along with a record separator. See IO#puts for full details.

read

read(size=nil, buf=nil) Instance Public methods Reads size bytes from the stream. If buf is provided it must reference a string which will receive the data. See IO#read for full details.

read_nonblock

read_nonblock(maxlen, buf=nil) Instance Public methods Reads at most maxlen bytes in the non-blocking manner. When no data can be read without blocking it raises OpenSSL::SSL::SSLError extended by IO::WaitReadable or IO::WaitWritable. IO::WaitReadable means SSL needs to read internally so #read_nonblock should be called again when the underlying IO is readable. IO::WaitWritable means SSL needs to write internally so #read_nonblock should be called again after the underlying IO is w

readchar

readchar() Instance Public methods Reads a one-character string from the stream. Raises an EOFError at end of file.

readline

readline(eol=$/) Instance Public methods Reads a line from the stream which is separated by eol. Raises EOFError if at end of file.

readlines

readlines(eol=$/) Instance Public methods Reads lines from the stream which are separated by eol. See also gets

readpartial

readpartial(maxlen, buf=nil) Instance Public methods Reads at most maxlen bytes from the stream. If buf is provided it must reference a string which will receive the data. See IO#readpartial for full details.