Class: ConvenientService::Service::Plugins::CanHaveAroundStepCallbacks::Middleware
- Inherits:
-
MethodChainMiddleware
- Object
- ConvenientService::Service::Plugins::CanHaveAroundStepCallbacks::Middleware
- Defined in:
- lib/convenient_service/service/plugins/can_have_around_step_callbacks/middleware.rb
Instance Method Summary collapse
Instance Method Details
#next(method, **kwargs, &block) ⇒ ConvenientService::Common::Plugins::CanHaveCallbacks::Entities::Callback
72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/convenient_service/service/plugins/can_have_around_step_callbacks/middleware.rb', line 72 def next(method, **kwargs, &block) return chain.next(method, **kwargs, &block) if method != :step entity.step_class.class_exec(kwargs, block) do |kwargs, block| around :result, **kwargs.merge(source_location: block.source_location) do |chain| organizer.instance_exec( proc { chain.yield.step }, params.to_callback_arguments, &block ) end end end |