Class: ConvenientService::Common::Plugins::EnsuresNegatedJSendResult::Middleware

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

Instance Method Summary collapse

Instance Method Details

#nextConvenientService::Service::Plugins::HasJSendResult::Entities::Result



13
14
15
16
17
# File 'lib/convenient_service/common/plugins/ensures_negated_j_send_result/middleware.rb', line 13

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

  result.negated? ? result : result.copy(overrides: {kwargs: {negated: true}})
end