Class: Failbot::MemoryBackend
- Inherits:
-
Object
- Object
- Failbot::MemoryBackend
- Defined in:
- lib/failbot/memory_backend.rb
Instance Attribute Summary collapse
-
#reports ⇒ Object
Returns the value of attribute reports.
Instance Method Summary collapse
- #fail! ⇒ Object
-
#initialize ⇒ MemoryBackend
constructor
A new instance of MemoryBackend.
- #ping ⇒ Object
- #report(data) ⇒ Object
Constructor Details
#initialize ⇒ MemoryBackend
Returns a new instance of MemoryBackend.
3 4 5 6 |
# File 'lib/failbot/memory_backend.rb', line 3 def initialize @reports = [] @fail = false end |
Instance Attribute Details
#reports ⇒ Object
Returns the value of attribute reports.
8 9 10 |
# File 'lib/failbot/memory_backend.rb', line 8 def reports @reports end |
Instance Method Details
#fail! ⇒ Object
10 11 12 |
# File 'lib/failbot/memory_backend.rb', line 10 def fail! @fail = true end |
#ping ⇒ Object
22 23 24 |
# File 'lib/failbot/memory_backend.rb', line 22 def ping # nop end |
#report(data) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/failbot/memory_backend.rb', line 14 def report(data) if @fail fail end @reports << data end |