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



303
304
305
306
# File 'lib/wcc.rb', line 303

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

.mappingsObject



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

def self.mappings; @@mappings end