An exercise on ruby classes