Class: Setsuzoku::ExternalApiHandler
- Inherits:
-
Object
- Object
- Setsuzoku::ExternalApiHandler
- Defined in:
- lib/setsuzoku/external_api_handler.rb
Overview
The base definition for the exception handling class. This can be overridden by application configuration.
Instance Method Summary collapse
Instance Method Details
#call_external_api_exception(**args) ⇒ Object
14 15 16 17 |
# File 'lib/setsuzoku/external_api_handler.rb', line 14 def call_external_api_exception(**args) puts(args[:exception].backtrace.join("\n")) if args[:exception] puts("call_external_api failed with: #{args.inspect}") end |
#call_external_api_wrapper(**args) ⇒ Object
8 9 10 11 12 |
# File 'lib/setsuzoku/external_api_handler.rb', line 8 def call_external_api_wrapper(**args) puts('Setsuzoku API call pending') response = yield puts("Setsuzoku API call complete. Success status: #{response[:success]}") end |