Class: Vayacondios::NotifierFactory
- Inherits:
-
Object
- Object
- Vayacondios::NotifierFactory
- Defined in:
- lib/vayacondios/client/notifier.rb
Class Method Summary collapse
Class Method Details
.receive(attrs = {}) ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/vayacondios/client/notifier.rb', line 81 def self.receive(attrs = {}) type = attrs[:type] case type when 'http' then HttpNotifier.new(attrs) when 'cube' then CubeNotifier.new(attrs) when 'zabbix' then ZabbixNotifier.new(attrs) when 'log' then LogNotifier.new(attrs) when 'none','null' then NullNotifier.new(attrs) else raise ArgumentError, "<#{type}> is not a valid build option" end end |