Class: WCC::Notificators

Inherits:
Object
  • Object
show all
Defined in:
lib/wcc.rb

Constant Summary collapse

@@mappings =
{}

Class Method Summary collapse

Class Method Details

.map(name, klass) ⇒ Object

API method - add a mapping from conf string to class object

Parameters:

  • name (String)

    the string to be used in conf.yml’s conf entry

  • klass (Class)

    the associated notifier class



312
313
314
315
# File 'lib/wcc.rb', line 312

def self.map(name, klass)
	WCC.logger.debug "Register notificator #{klass.inspect} for #{name}"
	@@mappings[name] = klass
end

.mappingsObject



317
# File 'lib/wcc.rb', line 317

def self.mappings; @@mappings end