You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I spoke with Joênio, and a plugin architecture can be done in different ways. The most basic is to create a interface and tell the plugin to implement those methods that are used to collect data on each distros. The current implementation it's already using this method, the next step is to separate the classes that implement the concrete class in a plugin directory.
Searching for more information about plugins on Ohai architecture, I built an example of how can implement a plugins arch using something similar to Ohai.
First we have a module or class that implements a plugin method (see below).
# some_lib.rbmoduleCupperdefself.method(text)putstextenddefself.plugin(name, &block)Cupper.class_eval(&block)endload'some_plugin.rb'# The starting point of loading the pluginsend
This method will receive a block of code from the plugin
# some_plugin.rbCupper.plugin(:plugin_name)domethod"Texto to display"end
That's the rough structure, but I don't think that is a good think to do it now.
Cupper must be extensible for plugins.
The text was updated successfully, but these errors were encountered: