From: Rich Kilmer Date: 2002-04-16T23:52:59+09:00 Subject: RE: RFC - class_added callback Could it be used in AspectR to automatically append features to classes when they are defined (maybe through a lookup table, etc)? Or some type of debugging system that would append fixtures to classes (patching, etc). Bob Calco and I have been contemplating what it would be like to add a logic programming capability to Ruby what could respond to Ruby VM events that kick off rules that cascade changes into the VM based on Classes being added, etc. I think if the capability was there the uses would emerge. -rich > -----Original Message----- > From: Michal Rokos [mailto:m.rokos@sh.cvut.cz] > Sent: Tuesday, April 16, 2002 10:04 AM > To: ruby-talk ML > Subject: Re: RFC - class_added callback > > Hello, > > In article <1018912246.993822.25667.nullmailer@picachu.netlab.jp>, > Yukihiro Matsumoto wrote: > > In message "Re: RFC - class_added callback" > > on 02/04/15, Michal Rokos writes: > > > >| I will be a little rude and answer by question: "What for is > >| "method added" and what for "inherited" callback?" The answer is > >| the same as for "class_added" callback. > > > > "method_added" is used for example by Ruby/Gtk to install gtk callback. > > "inherited" is used for example by singleton.rb to update "instance" > method. > > Then, it's your turn. ;-) > > My turn, hmmm. > > The problem is that I cannot give where is "class_added" example > used, because it's brand new... :-) > > But I can imagine that it can be handy for: > - introspection > - logger (to monitor what it happening) > - the situation when the "inherited" callback cannot be > used - when people need to inform other > classes/modules (benefit of different "receiver" than > "inherited" has) > > Uff - this all is a little dumb examples, but hopefully somebody > can think of a better example. > > Michal > > > PS: to all: HELP FOLKS! :-) > > -- > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > Michal Rokos Czech Technical University, Prague > E-mail:m.rokos@sh.cvut.cz ICQ:36118339 Jabber:majkl@jabber.sh.cvut.cz > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-