Class: Integrity::Notifier

Inherits:
Object show all
Includes:
DataMapper::Resource
Defined in:
lib/integrity/notifier.rb,
lib/integrity/notifier/base.rb,
lib/integrity/notifier/test.rb,
lib/integrity/notifier/test/hpricot_matcher.rb

Defined Under Namespace

Modules: Test Classes: Base

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.availableObject



18
19
20
21
# File 'lib/integrity/notifier.rb', line 18

def self.available
  @@_notifiers ||= {}
  @@_notifiers
end

.register(klass) ⇒ Object

Raises:

  • (ArgumentError)


23
24
25
26
27
# File 'lib/integrity/notifier.rb', line 23

def self.register(klass)
  raise ArgumentError unless valid?(klass)

  available[klass.to_s.split(":").last] = klass
end

Instance Method Details

#notify_of_build(build) ⇒ Object



35
36
37
# File 'lib/integrity/notifier.rb', line 35

def notify_of_build(build)
  to_const.notify_of_build(build, config) if to_const
end