sample code for understading objects and classes in ruby