Callable object that should be called with every descendent class created.
All subclasses for the current model. Does not include the model itself.
All descendent classes of this model.
# File lib/sequel/plugins/subclasses.rb, line 44 def descendents Sequel.synchronize{_descendents} end
Add the subclass to this model's current subclasses, and initialize a new subclasses instance variable in the subclass.
# File lib/sequel/plugins/subclasses.rb, line 51 def inherited(subclass) super Sequel.synchronize{subclasses << subclass} subclass.instance_variable_set(:@subclasses, []) if on_subclass subclass.instance_variable_set(:@on_subclass, on_subclass) on_subclass.call(subclass) end end