From: Robert Dober Date: 2010-05-16T01:36:49+09:00 Subject: Re: class best way for getters ? 2010/5/15 Une Bévue : depends (I know this is too long, but anyway) if no new keys can be added to @atts it is quite easy http://pastie.org/961685 if keys can be added one might do this http://pastie.org/961691 But it starts to become really interesting if methods can disappear. Of course we could just use method_missing without defining a getter, but having an observer on @atts that would add remove methods on the receiver would be quite an elegant approach. Unfamiliar with built in observers I have made a sketch of how I would like to implement such a functionality here http://pastie.org/961738 HTH R. > -- >  « Je suis sûr que la gaîté ambiguë du drôle de garçon qui a bu du > whisky et fait le zèbre sur un vieux caïman à Noël dans le cañon, a été > bénéfique à l'âme du poète blême, ainsi qu'à son cœur & cætera ! » >  (© Jean-Paul Blanc) > > -- The best way to predict the future is to invent it. -- Alan Kay