Class: USB::Interface
- Inherits:
-
Object
- Object
- USB::Interface
- Extended by:
- Forwardable
- Includes:
- Comparable
- Defined in:
- lib/libusb/compat.rb
Instance Method Summary collapse
- #<=>(o) ⇒ Object
- #bus ⇒ Object
- #configuration ⇒ Object
- #device ⇒ Object
- #endpoints ⇒ Object
-
#initialize(i) ⇒ Interface
constructor
A new instance of Interface.
- #settings ⇒ Object
Constructor Details
#initialize(i) ⇒ Interface
Returns a new instance of Interface.
227 228 229 |
# File 'lib/libusb/compat.rb', line 227 def initialize(i) @i = i end |
Instance Method Details
#<=>(o) ⇒ Object
233 234 235 |
# File 'lib/libusb/compat.rb', line 233 def <=>(o) @i<=>o.instance_variable_get(:@i) end |
#bus ⇒ Object
237 |
# File 'lib/libusb/compat.rb', line 237 def bus() self.configuration.device.bus end |
#configuration ⇒ Object
239 |
# File 'lib/libusb/compat.rb', line 239 def configuration; Configuration.new(@i.configuration); end |
#device ⇒ Object
238 |
# File 'lib/libusb/compat.rb', line 238 def device() self.configuration.device end |
#endpoints ⇒ Object
241 |
# File 'lib/libusb/compat.rb', line 241 def endpoints() self.settings.map {|d| d.endpoints }.flatten end |