Sha256: fba1de561b93411a4b6ce36d1d3cd9f975c998ca3239990834444b417b333206
Contents?: true
Size: 704 Bytes
Versions: 4
Compression:
Stored size: 704 Bytes
Contents
# frozen_string_literal: true module ConvenientService module Service module Plugins module RaisesOnNotResultReturnValue class Middleware < MethodChainMiddleware include Support::DependencyContainer::Import import :"commands.is_result?", from: Service::Plugins::HasJSendResult::Container intended_for any_method, entity: :service def next(...) original_result = chain.next(...) return original_result if commands.is_result?(original_result) raise Exceptions::ReturnValueNotKindOfResult.new(service: entity, result: original_result, method: method) end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems