Exception: ConvenientService::Service::Plugins::RaisesOnDoubleResult::Exceptions::DoubleResult Private
- Inherits:
-
Exception
- Object
- StandardError
- Exception
- ConvenientService::Service::Plugins::RaisesOnDoubleResult::Exceptions::DoubleResult
- Defined in:
- lib/convenient_service/service/plugins/raises_on_double_result/exceptions.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.
Instance Method Summary collapse
Methods inherited from Exception
Instance Method Details
#initialize_with_kwargs(service:) ⇒ Object
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.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/convenient_service/service/plugins/raises_on_double_result/exceptions.rb', line 14 def initialize_with_kwargs(service:) = <<~TEXT `#{service.class}` service has a double result. Make sure its #result calls only one from the following methods `success`, `failure`, or `error` and only once. Maybe you missed `return`? The most common scenario is similar to this one: def result # ... error unless valid? # instead of return error unless valid? success end TEXT initialize() end |