Class: Cassia::ResponseHandlers::DiscoverAllChar

Inherits:
Object
  • Object
show all
Defined in:
lib/cassia/response_handlers/discover_all_char.rb

Instance Method Summary collapse

Constructor Details

#initialize(access_controller, router:, device_mac:) ⇒ DiscoverAllChar

Returns a new instance of DiscoverAllChar.



4
5
6
7
8
# File 'lib/cassia/response_handlers/discover_all_char.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_char.rb', line 10

def handle(response)
  if response.success?
    handle_success(response)
  else
    handle_failure(response)
  end
  response.success?
end