Class: ConvenientService::Service::Plugins::CanHaveMethodSteps::Middleware

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

Instance Method Summary collapse

Instance Method Details

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

Parameters:

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

Returns:



16
17
18
19
20
# File 'lib/convenient_service/service/plugins/can_have_method_steps/middleware.rb', line 16

def next(*args, **kwargs, &block)
  return chain.next(*args, **kwargs, &block) unless args.first.instance_of?(::Symbol)

  chain.next(entity, *args[1..], **kwargs.merge(method: args.first), &block)
end