IO.readlines(name, sep=$/ [, open_args]) â array
IO.readlines(name, limit [, open_args]) â array
IO.readlines(name, sep, limit [, open_args]) â array
IO.readlines(name, limit [, open_args]) â array
IO.readlines(name, sep, limit [, open_args]) â array
Class Public methods
Reads the entire file specified by name as individual lines, and returns those lines in an array. Lines are separated by sep.
a = IO.readlines("testfile") a[0] #=> "This is line one\n"
If the last argument is a hash, it's the keyword argument to open. See
IO.read
for detail.
Please login to continue.