Class: USB::Setting
- Inherits:
-
Object
- Object
- USB::Setting
- Defined in:
- lib/usb.rb
Instance Method Summary collapse
Instance Method Details
#bus ⇒ Object
352 |
# File 'lib/usb.rb', line 352 def bus() self.interface.configuration.device.bus end |
#configuration ⇒ Object
354 |
# File 'lib/usb.rb', line 354 def configuration() self.interface.configuration end |
#description ⇒ Object
347 348 349 350 |
# File 'lib/usb.rb', line 347 def description return @description if defined? @description @description = self.device.open {|h| h.get_string_simple(self.iInterface) } end |
#device ⇒ Object
353 |
# File 'lib/usb.rb', line 353 def device() self.interface.configuration.device end |
#inspect ⇒ Object
333 334 335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/usb.rb', line 333 def inspect if self.revoked? "\#<#{self.class} revoked>" else attrs = [] attrs << self.bAlternateSetting.to_s devclass = USB.dev_string(self.bInterfaceClass, self.bInterfaceSubClass, self.bInterfaceProtocol) attrs << devclass desc = self.description attrs << desc if desc != '?' "\#<#{self.class} #{attrs.join(' ')}>" end end |