Sha256: 38bbcdec28dea08c1a5934bdd2973bdb25c4b9504c50be16770d52c9c0db444a

Contents?: true

Size: 595 Bytes

Versions: 1

Compression:

Stored size: 595 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Service
    module Plugins
      module HasJSendResultShortSyntax
        module Failure
          class Middleware < MethodChainMiddleware
            intended_for :failure, entity: :service

            def next(*args, **kwargs, &block)
              return chain.next(*args, data: kwargs, &block) unless kwargs.has_key?(:data)

              Commands::AssertKwargsContainOnlyJSendKeys.call(kwargs: kwargs)

              chain.next(*args, **kwargs, &block)
            end
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
convenient_service-0.13.0 lib/convenient_service/service/plugins/has_j_send_result_short_syntax/failure/middleware.rb