Ruby practice. Solve the problems in Learn Ruby the Hard Way