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