Class: Cassia::ResponseHandlers::CloseConnectionState
- Inherits:
-
Object
- Object
- Cassia::ResponseHandlers::CloseConnectionState
- Defined in:
- lib/cassia/response_handlers/close_connection_state.rb
Instance Method Summary collapse
- #handle(response) ⇒ Object
-
#initialize(access_controller, aps:) ⇒ CloseConnectionState
constructor
A new instance of CloseConnectionState.
Constructor Details
#initialize(access_controller, aps:) ⇒ CloseConnectionState
Returns a new instance of CloseConnectionState.
4 5 6 7 |
# File 'lib/cassia/response_handlers/close_connection_state.rb', line 4 def initialize(access_controller, aps: ) @access_controller = access_controller @aps = aps end |
Instance Method Details
#handle(response) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/cassia/response_handlers/close_connection_state.rb', line 9 def handle(response) if response.success? handle_success else handle_failure(response) end response.success? end |