Class: ConvenientService::Service::Plugins::RaisesOnNotResultReturnValue::Middleware
- Inherits:
-
MethodChainMiddleware
- Object
- ConvenientService::Service::Plugins::RaisesOnNotResultReturnValue::Middleware
- Defined in:
- lib/convenient_service/service/plugins/raises_on_not_result_return_value/middleware.rb
Instance Method Summary collapse
Methods included from ConvenientService::Support::DependencyContainer::Import
Instance Method Details
#next ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/convenient_service/service/plugins/raises_on_not_result_return_value/middleware.rb', line 14 def next(...) original_result = chain.next(...) return original_result if commands.is_result?(original_result) ::ConvenientService.raise Exceptions::ReturnValueNotKindOfResult.new(service: entity, result: original_result, method: method) end |