Sha256: 0d27eb01451ecdf23bc425ad16c0a646a3249b99e0fc6a76f20642ebf94d8160
Contents?: true
Size: 836 Bytes
Versions: 7
Compression:
Stored size: 836 Bytes
Contents
# frozen_string_literal: true module ConvenientService module Service module Plugins module HasJSendResultShortSyntax module Success class Middleware < MethodChainMiddleware intended_for :success, entity: :service ## # @param args [Array<Object>] # @param kwargs [Hash{Symbol => Object}] # @param block [Proc, nil] # @return [ConvenientService::Service::Plugins::HasJSendResult::Entities::Result] # def next(*args, **kwargs, &block) Commands::RefuteKwargsContainJSendAndExtraKeys[kwargs: kwargs] ([:data, :message, :code].any? { |key| kwargs.has_key?(key) }) ? chain.next(**kwargs) : chain.next(data: kwargs) end end end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems