Skip to content

Instantly share code, notes, and snippets.

Created February 10, 2015 02:45
Show Gist options
  • Save anonymous/0eed7b2d750a8ed410cb to your computer and use it in GitHub Desktop.
Save anonymous/0eed7b2d750a8ed410cb to your computer and use it in GitHub Desktop.
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