to_a

ARGF.to_a(sep=$/) â array
ARGF.to_a(limit) â array
ARGF.to_a(sep, limit) â array
Instance Public methods

Reads ARGF's current file in its entirety, returning an Array of its lines, one line per element. Lines are assumed to be separated by sep.

lines = ARGF.readlines
lines[0]                #=> "This is line one\n"
doc_ruby_on_rails
2015-03-30 13:35:32
Comments
Leave a Comment

Please login to continue.