Class: MyApiClient::ErrorHandling::Generator
- Inherits:
-
ServiceAbstract
- Object
- ServiceAbstract
- MyApiClient::ErrorHandling::Generator
- Defined in:
- lib/my_api_client/error_handling/generator.rb
Overview
Generates an error handler proc (or symbol)
Constant Summary collapse
- ARGUMENTS =
%i[instance response status_code headers json with raise block].freeze
Instance Method Summary collapse
-
#initialize(**options) ⇒ Proc?
constructor
Returns the error handler as “Proc”.
Methods inherited from ServiceAbstract
Constructor Details
#initialize(**options) ⇒ Proc?
Returns the error handler as “Proc”. If no error occurs, return ‘nil`.
30 31 32 33 |
# File 'lib/my_api_client/error_handling/generator.rb', line 30 def initialize(**) [:raise] ||= MyApiClient::Error verify_and_set_arguments(**) end |