Class: Cassia::ResponseHandlers::ConnectDevice
- Inherits:
-
Object
- Object
- Cassia::ResponseHandlers::ConnectDevice
- Defined in:
- lib/cassia/response_handlers/connect_device.rb
Instance Method Summary collapse
- #handle(response) ⇒ Object
-
#initialize(access_controller) ⇒ ConnectDevice
constructor
A new instance of ConnectDevice.
Constructor Details
#initialize(access_controller) ⇒ ConnectDevice
Returns a new instance of ConnectDevice.
4 5 6 |
# File 'lib/cassia/response_handlers/connect_device.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/connect_device.rb', line 8 def handle(response) if response.success? handle_success(response) else handle_failure(response) end response.success? end |