#inherited is called right after the class Foo statement. I want something that\'ll run only after the end statement that closes the c
You may be out of luck. But that's only a warning, not a definitive answer.
Ruby hooks the beginning of the class definition, rather than the end, for Class#inherited b/c ruby class definitions don't have a real end. They can
be reopened any time.
There was some talk a couple years ago about adding a const_added trigger, but it hasn't gone through yet. From Matz:
I'm not going to implement every possible hook. So when somebody comes with more concrete usage, I will consider this again. It would be
const_added, notclass_added.
So this might handle your case - but I'm not sure (it may trigger on the start too, when it's eventually implemented).
What are you trying to do with this trigger? There may be another way to do it.