Module: Listing::ClassMethods
- Defined in:
- lib/nose/util.rb
Overview
Add a class method to track new subclasses
Instance Method Summary collapse
-
#inherited(subclass) ⇒ void
Track this new subclass for later.
-
#subclasses ⇒ Hash<String, Class>
List all of the encountered subclasses.
Instance Method Details
#inherited(subclass) ⇒ void
This method returns an undefined value.
Track this new subclass for later
306 307 308 |
# File 'lib/nose/util.rb', line 306 def inherited(subclass) class_variable_get(:@@registry)[subclass.name] = subclass end |
#subclasses ⇒ Hash<String, Class>
List all of the encountered subclasses
312 313 314 |
# File 'lib/nose/util.rb', line 312 def subclasses class_variable_get(:@@registry) end |