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