From: Alexandru Popescu Date: 2005-08-05T04:46:09+09:00 Subject: Re: interesting test tool... looking for opinions. #: Phil Tomson changed the world a bit at a time by saying on 8/4/2005 9:16 PM :# > In article <42F1BBE4.8020605@capitain.de>, > Pit Capitain wrote: >>Alexandru Popescu schrieb: >>> Is there any metadata that can be associated with a method? I know it is >>> an object, and maybe you can attach some metadata to it. From that point >>> on the things will be more simple. >> >>No, you can't attach metadata to methods, but you can attach them to the >>class or module where the methods are defined. I think this should be >>enough for something like TestNG. For more info look into the archives >>of ruby-talk or ruby-core (I don't remember where). >> > > Why couldn't you add metadata to methods? > > class Metod > def metadata > @metadata > end > > def metadata= data > @metadata = data > end > end > > def foo > "foo" > end > > > foometh = self.method(:foo) > > foometh.metadata = "This method just says foo" > > puts foometh.metadata #=> This method just says foo > > > Phil > > > > That was exactly what I have thought ... but haven't the means to express it. Thanks Phil. :alex |.::the_mindstorm::.|