Ruby homework from AM