Class: Opticon::Notifier::Dummy

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

Overview

Dummy notifier used in testing. It doesn’t do anything other than store the error_messages fed in to the notify method. These can later be be retrieved by looking at the object’s notifications instance attribute.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDummy

Returns a new instance of Dummy.



136
137
138
# File 'lib/opticon/notifier.rb', line 136

def initialize()
  @notifications = []
end

Instance Attribute Details

#notificationsObject

Returns the value of attribute notifications.



134
135
136
# File 'lib/opticon/notifier.rb', line 134

def notifications
  @notifications
end

Instance Method Details

#notify(failures) ⇒ Object



140
141
142
# File 'lib/opticon/notifier.rb', line 140

def notify(failures)
  @notifications << failures
end