From: Macario Ortega Date: 2008-10-29T16:28:14+09:00 Subject: Re: inherited behaviour. Yossef Mendelssohn wrote: > On May 1, 3:37 pm, "David A. Black" wrote: >> >> >>> end # this is point (2) >> > the inheritance later on. Consider the following: >> > # more stuff >> That seems very arbitrary, though, in the sense that the superclass's >> Seehttp://www.rubypal.comfor details and updates! > It is arbitrary, but it makes sense if the method is called > 'inherited'. Really, I agree that it work the way it does now, when > the inheritance actually happens. If something has to happen at a > different point, it should be a different callback that does it. Hi, I have this situation where it would save me some typing if the inherited callback was called after the class was fully defined (with all its methods). is there a way I can get "yeah!" instead of "damn!"? class A def self.inherited(klass) p klass.respond_to?(:my_method) ? "yeah!" : "damn!" end end class B < A def self.my_method end end p "too late!" if B.respond_to?(:my_method) thanks! -- Posted via http://www.ruby-forum.com/.