Categories: None [Edit]

pluginfactory

https://rubygems.org/gems/pluginfactory
PluginFactory is a mixin module that turns an including class into a factory for its derivatives, capable of searching for and loading them by name. This is useful when you have an abstract base class which defines an interface and basic functionality for a part of a larger system, and a collection of subclasses which implement the interface for different underlying functionality. An example of where this might be useful is in a program which talks to a database. To avoid coupling it to a specific database, you use a Driver class which encapsulates your program's interaction with the database behind a useful interface. Now you can create a concrete implementation of the Driver class for each kind of database you wish to talk to. If you make the base Driver class a PluginFactory, too, you can add new drivers simply by dropping them in a directory and using the Driver's `create` method to instantiate them:

Total

Ranking: 12,998 of 180,404
Downloads: 133,195

Daily

Ranking: 37,371 of 180,385
Downloads: 8

Depended by

RankDownloadsName
17,11883,657rehabilitate
38,37326,993arrow

Depends on

RankDownloadsName
213145,721,844rdoc
1,9478,397,922hoe
20,79562,297hoe-deveiate
22,04057,348hoe-mercurial
22,04057,348hoe-mercurial
29,17838,678hoe-highline

Owners

#GravatarHandle
1iconmahlon
2iconged