Class: ConvenientService::Service::Plugins::HasJSendResultShortSyntax::Middleware Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

Instance Method Summary collapse

Instance Method Details

#next(*args, **kwargs, &block) ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • args (Array<Object>)
  • kwargs (Hash{Symbol => Object})
  • block (Proc, nil)

Returns:

Since:

  • 1.0.0



21
22
23
24
25
# File 'lib/convenient_service/service/plugins/has_j_send_result_short_syntax/middleware.rb', line 21

def next(*args, **kwargs, &block)
  ::ConvenientService.raise Exceptions::BothArgsAndKwargsArePassed.new(status: method) if args.any? && kwargs.any?

  kwargs.any? ? result_from_kwargs : result_from_args
end