Class: Roseflow::StabilityAI::ResponseHandler
- Inherits:
-
Object
- Object
- Roseflow::StabilityAI::ResponseHandler
- Defined in:
- lib/roseflow/stabilityai/response_handler.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(operation, response) ⇒ ResponseHandler
constructor
A new instance of ResponseHandler.
Constructor Details
#initialize(operation, response) ⇒ ResponseHandler
Returns a new instance of ResponseHandler.
12 13 14 15 |
# File 'lib/roseflow/stabilityai/response_handler.rb', line 12 def initialize(operation, response) @operation = operation @response = response end |
Instance Method Details
#call ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/roseflow/stabilityai/response_handler.rb', line 17 def call if response.success? handle_successful_response else handle_error_response end end |