Class: ConvenientService::Service::Plugins::CountsStubbedResultsInvocations::Middleware

Inherits:
MethodChainMiddleware
  • Object
show all
Defined in:
lib/convenient_service/service/plugins/counts_stubbed_results_invocations/middleware.rb

Instance Method Summary collapse

Instance Method Details

#nextConvenientService::Service::Plugins::HasJSendResult::Entities::Result



13
14
15
16
17
18
19
# File 'lib/convenient_service/service/plugins/counts_stubbed_results_invocations/middleware.rb', line 13

def next(...)
  result = chain.next(...)

  result.stubbed_result_invocations_counter.increment! if result.stubbed_result?

  result
end