Module | Puppet::Util::SubclassLoader |
In: |
lib/puppet/util/subclass_loader.rb
|
A module for loading subclasses into an array and retrieving them by name. Also sets up a method for each class so that you can just do Klass.subclass, rather than Klass.subclass(:subclass).
This module is currently used by network handlers and clients.
classloader | [RW] | |
loader | [RW] |
The hook method that sets up subclass loading. We need the name of the method to create and the path in which to look for them.
Add a new class to our list. Note that this has to handle subclasses of subclasses, thus the reason we‘re keeping track of the @@classloader.