Class: LIBUSB::Context::EMPollfdHandler
- Inherits:
-
EventMachine::Connection
- Object
- EventMachine::Connection
- LIBUSB::Context::EMPollfdHandler
- Defined in:
- lib/libusb/eventmachine.rb
Instance Method Summary collapse
-
#initialize ⇒ EMPollfdHandler
constructor
A new instance of EMPollfdHandler.
- #need_handle_events ⇒ Object (also: #notify_readable, #notify_writable)
- #on_need_handle_events(&block) ⇒ Object
Constructor Details
#initialize ⇒ EMPollfdHandler
Returns a new instance of EMPollfdHandler.
72 73 74 75 |
# File 'lib/libusb/eventmachine.rb', line 72 def initialize @callbacks = [] super end |
Instance Method Details
#need_handle_events ⇒ Object Also known as: notify_readable, notify_writable
81 82 83 84 85 |
# File 'lib/libusb/eventmachine.rb', line 81 def need_handle_events @callbacks.each do |cb| cb.call end end |
#on_need_handle_events(&block) ⇒ Object
77 78 79 |
# File 'lib/libusb/eventmachine.rb', line 77 def on_need_handle_events(&block) @callbacks << block end |