Mega Code Archive
Categories
/
Ruby
/
File Directory
Open a file stream, and then retrieve each line in order with the IO method gets
file = File.new( "yourFile.txt" ) file.gets file.gets