Class: ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Plugins::RaisesOnNotResultReturnValue::Middleware

Inherits:
MethodChainMiddleware
  • Object
show all
Includes:
ConvenientService::Support::DependencyContainer::Import
Defined in:
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/raises_on_not_result_return_value/middleware.rb

Instance Method Summary collapse

Methods included from ConvenientService::Support::DependencyContainer::Import

import

Instance Method Details

#nextObject



18
19
20
21
22
23
24
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/raises_on_not_result_return_value/middleware.rb', line 18

def next(...)
  original_result = chain.next(...)

  return original_result if commands.is_result?(original_result)

  ::ConvenientService.raise Exceptions::ReturnValueNotKindOfResult.new(step: entity, result: original_result)
end