[Nuby] Detecting when a class is inherited

Hi 'talk,
Is there any way to detect when a class is inherited? I.e, I wanna
know in the base class when some class inherits from it. I seem to
remember there was some sort of hook for this purpose(it could be just
me, too)

Anyone?

TIA
-Shajith.

Hi,

···

In message "Re: [Nuby] Detecting when a class is inherited" on Wed, 20 Oct 2004 14:30:12 +0900, CT <demerzel@gmail.com> writes:

Is there any way to detect when a class is inherited? I.e, I wanna
know in the base class when some class inherits from it. I seem to
remember there was some sort of hook for this purpose(it could be just
me, too)

  class Derived<Base
  end

would call "Base.inherited(Derived)".

              matz.

Thanks!

···

On Wed, 20 Oct 2004 14:53:29 +0900, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:

Hi,

In message "Re: [Nuby] Detecting when a class is inherited" > on Wed, 20 Oct 2004 14:30:12 +0900, CT <demerzel@gmail.com> writes:

>Is there any way to detect when a class is inherited? I.e, I wanna
>know in the base class when some class inherits from it. I seem to
>remember there was some sort of hook for this purpose(it could be just
>me, too)

  class Derived<Base
  end

would call "Base.inherited(Derived)".

                                                        matz.