module Sequel::Plugins::Subclasses::ClassMethods

Attributes

on_subclass[R]

Callable object that should be called with every descendent class created.

Public Instance Methods

descendants() click to toggle source

All descendent classes of this model.

   # File lib/sequel/plugins/subclasses.rb
63 def descendants
64   Sequel.synchronize{subclasses.dup}.map{|x| [x] + x.send(:descendants)}.flatten
65 end
Also aliased as: descendents
descendents()

SEQUEL6: Remove

Alias for: descendants
freeze_descendants() click to toggle source

Freeze all descendent classes. This also finalizes the associations for those classes before freezing.

   # File lib/sequel/plugins/subclasses.rb
72 def freeze_descendants
73   descendants.each(&:finalize_associations).each(&:freeze)
74 end
Also aliased as: freeze_descendents
freeze_descendents()

SEQUEL6: Remove

Alias for: freeze_descendants