Class: Alerty::PluginFactory
- Inherits:
-
Object
- Object
- Alerty::PluginFactory
- Defined in:
- lib/alerty/plugin_factory.rb
Class Method Summary collapse
Class Method Details
.new_plugin(config) ⇒ Object
8 9 10 11 12 |
# File 'lib/alerty/plugin_factory.rb', line 8 def new_plugin(config) require "alerty/plugin/#{config.type}" class_name = "Alerty::Plugin::#{StringUtil.camelize(config.type)}" Object.const_get(class_name).new(config) end |