Reading text file line by line using each
File.open("main.rb").each { |line| puts line }
each technically reads from the file delimiter by delimiter.
The standard delimiter is a "newline" character.
You can change this delimiter via Ruby Special Variables.