ruby OO exercise