class Alerty::PluginFactory
Public Class Methods
new_plugin(config)
click to toggle source
# 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
plugins()
click to toggle source
# File lib/alerty/plugin_factory.rb, line 4 def plugins @plugins ||= Config.plugins.map {|config| new_plugin(config) } end