Created
February 10, 2015 02:45
-
-
Save anonymous/0eed7b2d750a8ed410cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File.open('homeworkdata.txt', 'r') do |f| | |
while line = f.gets | |
lines = line.split(',') | |
grades = Grade.new(*lines) | |
puts grades | |
grade_arr << grades | |
end | |
end | |
OUTPUT | |
session03 : 5 | |
session04 : 5 | |
session05 : 5 | |
INPUT | |
session03,5 | |
session04,5 | |
session05,5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment