Comments to data.rb

There's repitition here with the student['key'] if student['key']. What if you made a change to make the 'key' dynamic? You have access to all of the keys using student.keys. Perhaps that would help you check whether the value is present too.

Try refactoring.