Module: SubclassTracking
- Included in:
- FileSystem, FileSystemImage, HostSystem, ImageFormat, NativeFileType
- Defined in:
- lib/SubclassTracking.rb
Overview
Class Method Summary collapse
Class Method Details
.extended(klazz) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/SubclassTracking.rb', line 3 def self.extended(klazz) (class <<klazz; self; end).send :attr_accessor, :subclasses (class <<klazz; self; end).send :define_method, :inherited do |clzz| klazz.subclasses << clzz super end klazz.subclasses = [] end |