Method: Wool::Warning.inherited
- Defined in:
- lib/wool/warning.rb
.inherited(klass) ⇒ Object
When a Warning subclass is subclassed, store the subclass and inform the next superclass up the inheritance hierarchy.
38 39 40 41 42 43 44 45 |
# File 'lib/wool/warning.rb', line 38 def self.inherited(klass) self.all_warnings << klass next_klass = self.superclass while next_klass != Wool::Warning.superclass next_klass.send(:inherited, klass) next_klass = next_klass.superclass end end |