Class: Failbot::WaiterBackend

Inherits:
Object
  • Object
show all
Defined in:
lib/failbot/waiter_backend.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(delay = 5) ⇒ WaiterBackend

Returns a new instance of WaiterBackend.



7
8
9
10
# File 'lib/failbot/waiter_backend.rb', line 7

def initialize(delay = 5)
  @delay = delay
  @reports = []
end

Instance Attribute Details

#reportsObject (readonly)

This backend waits a configured amount of time before returning. This is intended be used to test timeouts. Delay is the number of seconds to wait.



6
7
8
# File 'lib/failbot/waiter_backend.rb', line 6

def reports
  @reports
end

Instance Method Details

#pingObject



17
18
19
# File 'lib/failbot/waiter_backend.rb', line 17

def ping
  # nop
end

#report(data) ⇒ Object



12
13
14
15
# File 'lib/failbot/waiter_backend.rb', line 12

def report(data)
  @reports << data
  sleep(@delay)
end