Class: VcrStripeWebhook::ProcWaiter

Inherits:
Object
  • Object
show all
Defined in:
lib/vcr_stripe_webhook/waiter.rb

Instance Method Summary collapse

Constructor Details

#initialize(_proc) ⇒ ProcWaiter

Returns a new instance of ProcWaiter.



5
6
7
# File 'lib/vcr_stripe_webhook/waiter.rb', line 5

def initialize(_proc)
  @proc
end

Instance Method Details

#call(events) ⇒ Object



9
10
11
# File 'lib/vcr_stripe_webhook/waiter.rb', line 9

def call(events)
  @proc.call(events)
end

#timeout_message(_events, recording:) ⇒ Object



13
14
15
16
# File 'lib/vcr_stripe_webhook/waiter.rb', line 13

def timeout_message(_events, recording:)
  events_words = recording ? "received events" : "the recorded events"
  "wait_until proc does not return true with #{events_words}."
end