Encapsulation in ruby