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
permalink #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
permalink #<=>(o) ⇒ Object
[View source]
233 234 235 |
# File 'lib/libusb/compat.rb', line 233 def <=>(o) @i<=>o.instance_variable_get(:@i) end |
permalink #bus ⇒ Object
[View source]
237 |
# File 'lib/libusb/compat.rb', line 237 def bus() self.configuration.device.bus end |
permalink #configuration ⇒ Object
[View source]
239 |
# File 'lib/libusb/compat.rb', line 239 def configuration; Configuration.new(@i.configuration); end |
permalink #device ⇒ Object
[View source]
238 |
# File 'lib/libusb/compat.rb', line 238 def device() self.configuration.device end |
permalink #endpoints ⇒ Object
[View source]
241 |
# File 'lib/libusb/compat.rb', line 241 def endpoints() self.settings.map {|d| d.endpoints }.flatten end |
permalink #settings ⇒ Object
[View source]
240 |
# File 'lib/libusb/compat.rb', line 240 def settings; @i.alt_settings.map{|c| Setting.new(c) }; end |