object-oriented design in ruby