require_relative

require_relative(string) â true or false Instance Public methods Ruby tries to load the library named string relative to the requiring file's path. If the file's path cannot be determined a LoadError is raised. If a file is loaded true is returned and false otherwise.

readlines

readlines(sep=$/) â arrayreadlines(limit) â arrayreadlines(sep,limit) â array Instance Public methods Returns an array containing the lines returned by calling Kernel.gets(sep) until the end of file.

readline

readline(sep=$/) â stringreadline(limit) â stringreadline(sep, limit) â string Instance Public methods Equivalent to Kernel::gets, except readline raises EOFError at end of file.

rand

rand(max=0) â number Instance Public methods If called without an argument, or if max.to_i.abs == 0, rand returns a pseudo-random floating point number between 0.0 and 1.0, including 0.0 and excluding 1.0. rand #=> 0.2725926052826416 When max.abs is greater than or equal to 1, rand returns a pseudo-random integer greater than or equal to 0 and less than max.to_i.abs. rand(100) #=> 12 When max is a Range, rand returns a random number where range.member?(number)

raise

raiseraise(string)raise(exception [, string [, array]]) Instance Public methods With no arguments, raises the exception in $! or raises a RuntimeError if $! is nil. With a single String argument, raises a RuntimeError with the string as a message. Otherwise, the first parameter should be the name of an Exception class (or an object that returns an Exception object when sent an exception message). The optional second parameter sets the message associated with the exception, and the

puts

puts(obj, ...) â nil Instance Public methods Equivalent to $stdout.puts(obj, ...)

putc

putc(int) â int Instance Public methods Equivalent to: $stdout.putc(int) Refer to the documentation for IO#putc for important information regarding multi-byte characters.

proc

proc { |...| block } â a_proc Instance Public methods Equivalent to Proc.new.

printf

printf(io, string [, obj ... ]) â nilprintf(string [, obj ... ]) â nil Instance Public methods Equivalent to: io.write(sprintf(string, obj, ...) or $stdout.write(sprintf(string, obj, ...)

print

print(obj, ...) â nil Instance Public methods Prints each object in turn to $stdout. If the output field separator ($,) is not nil, its contents will appear between each field. If the output record separator ($\) is not nil, it will be appended to the output. If no arguments are given, prints $_. Objects that aren't strings will be converted by calling their to_s method. print "cat", [1,2,3], 99, "\n" $, = ", " $\ = "\n" print "cat", [1,2,3], 99 produces: cat12399 cat, 1, 2, 3