Sha256: 4713bbf38406636356c30edf121bf41c41cc60add54c0407f80a3282d1b7564b

Contents?: true

Size: 598 Bytes

Versions: 8

Compression:

Stored size: 598 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Service
    module Plugins
      module CountsStubbedResultsInvocations
        class Middleware < MethodChainMiddleware
          intended_for :result, scope: any_scope, entity: :service

          ##
          # @return [ConvenientService::Service::Plugins::HasJSendResult::Entities::Result]
          #
          def next(...)
            result = chain.next(...)

            result.stubbed_result_invocations_counter.increment! if result.stubbed_result?

            result
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/service/plugins/counts_stubbed_results_invocations/middleware.rb
convenient_service-0.19.0 lib/convenient_service/service/plugins/counts_stubbed_results_invocations/middleware.rb
convenient_service-0.18.0 lib/convenient_service/service/plugins/counts_stubbed_results_invocations/middleware.rb
convenient_service-0.17.0 lib/convenient_service/service/plugins/counts_stubbed_results_invocations/middleware.rb
convenient_service-0.16.0 lib/convenient_service/service/plugins/counts_stubbed_results_invocations/middleware.rb
convenient_service-0.15.0 lib/convenient_service/service/plugins/counts_stubbed_results_invocations/middleware.rb
convenient_service-0.14.0 lib/convenient_service/service/plugins/counts_stubbed_results_invocations/middleware.rb
convenient_service-0.13.0 lib/convenient_service/service/plugins/counts_stubbed_results_invocations/middleware.rb