dry-plugins: DSL for plugins
Abstract DSL for providing plug-in interface for PORO and complex structures.
Wikipedia says following:
The host application provides services which the plug-in can use, including a way for plug-ins to register themselves with the host application and a protocol for the exchange of data with plug-ins. Plug-ins depend on the services provided by the host application and do not usually work by themselves. Conversely, the host application operates independently of the plug-ins, making it possible for end-users to add and update plug-ins dynamically without needing to make changes to the host application.
Programmers typically implement plug-in functionality using shared libraries installed in a place prescribed by the host application. HyperCard supported a similar facility, but more commonly included the plug-in code in the HyperCard documents (called stacks) themselves. Thus the HyperCard stack became a self-contained application in its own right, distributable as a single entity that end-users could run without the need for additional installation-steps. Programs may also implement plugins by loading a directory of simple script files written in a scripting language like Python or Lua.
TL;DR
dry-plugins is a utility to provide plug-ins interface for your Ruby class (called host in documentation).
See Dry::Plugins.
Configuration: see Dry::Plugins::Config.
Documentation:
- Dry::Plugins::Registry - a plug-ins registry;
- Dry::Plugins::Registry::Resolver - a plug-in resolver;
- Dry::Plugins::Plugin — a proxy for a plug-in;
Copyright and License
© Alex Semyonov <[email protected]>, 2017, MIT license