module Flic::Client::Features::GetButtonUuid
Public Class Methods
new(*)
click to toggle source
Calls superclass method
# File lib/flic/client/features/get_button_uuid.rb, line 9 def initialize(*) @button_bluetooth_address_callbacks_semaphore = Mutex.new @button_bluetooth_address_callbacks = Hash.new { [] } super end
Public Instance Methods
Private Instance Methods
handle_event(event)
click to toggle source
Calls superclass method
# File lib/flic/client/features/get_button_uuid.rb, line 28 def handle_event(event) case event when Protocol::Events::GetButtonUuidResponse callback = @button_bluetooth_address_callbacks_semaphore.synchronize do @button_bluetooth_address_callbacks[event.bluetooth_address].shift end callback.call event.uuid if callback else super end end