For the impatient:
Class#inheritedis a] Callback invoked whenever a subclass of the current class is - ApiDock
The long story: Today I stumbled over a piece of code like the following:
class Foo class << self def inherited(subclass) $subclasses << subclass end end end
The interesting thing is that this was the only occurrence of
inherited in the entire codebase, so I instantly assumed some Ruby magic and went over to RubyDoc, but didn’t find anything there. After some additional Googling I found a mailing list post which confirmed that
inherited is a method on
Class, but it still didn’t explain why it didn’t show up on RubyDoc.