Class: USB::Device
- Inherits:
-
Object
- Object
- USB::Device
- Extended by:
- Forwardable
- Includes:
- Comparable
- Defined in:
- lib/libusb/compat.rb
Instance Method Summary collapse
- #<=>(o) ⇒ Object
- #bus ⇒ Object
- #configurations ⇒ Object
- #endpoints ⇒ Object
-
#initialize(dev) ⇒ Device
constructor
A new instance of Device.
- #interfaces ⇒ Object
- #open ⇒ Object
- #settings ⇒ Object
Constructor Details
#initialize(dev) ⇒ Device
Returns a new instance of Device.
166 167 168 |
# File 'lib/libusb/compat.rb', line 166 def initialize(dev) @dev = dev end |
Instance Method Details
#<=>(o) ⇒ Object
176 177 178 |
# File 'lib/libusb/compat.rb', line 176 def <=>(o) @dev<=>o.instance_variable_get(:@dev) end |
#bus ⇒ Object
193 |
# File 'lib/libusb/compat.rb', line 193 def bus; default_bus; end |
#configurations ⇒ Object
194 |
# File 'lib/libusb/compat.rb', line 194 def configurations; @dev.configurations.map{|c| Configuration.new(c) }; end |
#endpoints ⇒ Object
197 |
# File 'lib/libusb/compat.rb', line 197 def endpoints; @dev.endpoints.map{|c| Endpoint.new(c) }; end |
#interfaces ⇒ Object
195 |
# File 'lib/libusb/compat.rb', line 195 def interfaces; @dev.interfaces.map{|c| Interface.new(c) }; end |