Adding inheritance in ruby sample