Class: Opticon::Notifier::Dummy
- Inherits:
-
Object
- Object
- Opticon::Notifier::Dummy
- 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
-
#notifications ⇒ Object
Returns the value of attribute notifications.
Instance Method Summary collapse
-
#initialize ⇒ Dummy
constructor
A new instance of Dummy.
- #notify(failures) ⇒ Object
Constructor Details
#initialize ⇒ Dummy
Returns a new instance of Dummy.
136 137 138 |
# File 'lib/opticon/notifier.rb', line 136 def initialize() @notifications = [] end |
Instance Attribute Details
#notifications ⇒ Object
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 |