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