From: surrender_it@... (gabriele renzi @ google) Date: 2004-08-05T21:21:27+09:00 Subject: Re: Macros in Ruby Yohanes Santoso wrote... >and this is what the doc has to say about the '!Class' tag: > > !Class - A string indicating the fully-qualified class name. This > is a required field. > > >Robert's example is about similar to what MetaTags does. Thus, they >both make one to repeat one self; you have to say: "this docstring is >for this method of this class", even if the information is available >nearby. I think this counts as quirkiness. Actually, you don't: # utterly broken but shows the concept: [nickel@UltimaThule nickel]$ irb --simple-prompt >> def doc str >> @is_test=str >> end => nil >> class Module >> Docs=Hash.new >> def method_added(id) >> Docs[id]=@is_test if @is_test >> end >> end => nil >> class Foo >> doc "this speaks" >> def meow >> "meoww" >> end >> end => nil >> Module::Docs[:meow] => "this speaks" >> module M >> def foo >> end >> doc "yuppy" >> def baz >> 'naia' >> end >> end => nil >> Module::Docs[:baz] => "yuppy" anyway, I agree this is really far from perfect :)