Class: ConvenientService::Service::Plugins::RaisesOnNotResultReturnValue::Middleware Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

Instance Method Summary collapse

Instance Method Details

#next ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



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

def next(...)
  result = chain.next(...)

  return result if Service::Plugins::HasJSendResult.result?(result)

  ::ConvenientService.raise Exceptions::ReturnValueNotKindOfResult.new(service: entity, result: result, method: method)
end