Class: ConvenientService::Service::Plugins::CanHaveBeforeStepCallbacks::Middleware
- Inherits:
-
MethodChainMiddleware
- Object
- ConvenientService::Service::Plugins::CanHaveBeforeStepCallbacks::Middleware
- Defined in:
- lib/convenient_service/service/plugins/can_have_before_step_callbacks/middleware.rb
Instance Method Summary collapse
Instance Method Details
#next(method, **kwargs, &block) ⇒ ConvenientService::Common::Plugins::CanHaveCallbacks::Entities::Callback
68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/convenient_service/service/plugins/can_have_before_step_callbacks/middleware.rb', line 68 def next(method, **kwargs, &block) return chain.next(method, **kwargs, &block) if method != :step entity.step_class.class_exec(kwargs, block) do |kwargs, block| before :result, **kwargs.merge(source_location: block.source_location) do organizer.instance_exec( params.to_callback_arguments, &block ) end end end |