Class: QueuePulse::Notifiers::Test
- Defined in:
- lib/queue_pulse/notifiers/test.rb
Overview
Collects delivered alerts in memory. For use in tests and local dev.
Constant Summary
Constants inherited from Base
Base::MAX_RETRIES, Base::OPEN_TIMEOUT, Base::READ_TIMEOUT
Instance Attribute Summary collapse
-
#delivered ⇒ Object
readonly
Returns the value of attribute delivered.
Instance Method Summary collapse
- #clear ⇒ Object
- #deliver(alerts) ⇒ Object
-
#initialize ⇒ Test
constructor
A new instance of Test.
Constructor Details
#initialize ⇒ Test
Returns a new instance of Test.
9 10 11 12 |
# File 'lib/queue_pulse/notifiers/test.rb', line 9 def initialize super() @delivered = [] end |
Instance Attribute Details
#delivered ⇒ Object (readonly)
Returns the value of attribute delivered.
7 8 9 |
# File 'lib/queue_pulse/notifiers/test.rb', line 7 def delivered @delivered end |
Instance Method Details
#clear ⇒ Object
18 19 20 |
# File 'lib/queue_pulse/notifiers/test.rb', line 18 def clear @delivered.clear end |
#deliver(alerts) ⇒ Object
14 15 16 |
# File 'lib/queue_pulse/notifiers/test.rb', line 14 def deliver(alerts) @delivered.concat(alerts) end |