print

ios.print() â nil
ios.print(obj, ...) â nil
Instance Public methods

Writes the given object(s) to ios. The stream must be opened for writing. If the output field separator ($,) is not nil, it will be inserted between each object. 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. With no argument, prints the contents of the variable $_. Returns nil.

$stdout.print("This is ", 100, " percent.\n")

produces:

This is 100 percent.
doc_ruby_on_rails
2015-03-30 12:24:01
Comments
Leave a Comment

Please login to continue.