Method: LIBUSB::Device#open_interface
- Defined in:
- lib/libusb/device.rb
#open_interface(interface) ⇒ Object
Open the device and claim an interface.
This is a convenience method to #open and LIBUSB::DevHandle#claim_interface. Must be called with a block. When the block has finished, the interface will be released and the device will be closed.
78 79 80 81 82 83 84 |
# File 'lib/libusb/device.rb', line 78 def open_interface(interface) open do |dev| dev.claim_interface(interface) do yield dev end end end |