Class: Usbmux::MuxDevice
- Inherits:
-
Object
- Object
- Usbmux::MuxDevice
- Defined in:
- lib/usbmux/usbmux.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#location ⇒ Object
Returns the value of attribute location.
-
#serial ⇒ Object
Returns the value of attribute serial.
-
#usbprod ⇒ Object
Returns the value of attribute usbprod.
Instance Method Summary collapse
-
#initialize(id, usbprod, serial, location) ⇒ MuxDevice
constructor
A new instance of MuxDevice.
- #to_s ⇒ Object
Constructor Details
#initialize(id, usbprod, serial, location) ⇒ MuxDevice
Returns a new instance of MuxDevice.
48 49 50 51 52 53 |
# File 'lib/usbmux/usbmux.rb', line 48 def initialize(id, usbprod, serial, location) @id = id @usbprod = usbprod @serial = serial @location = location end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
46 47 48 |
# File 'lib/usbmux/usbmux.rb', line 46 def id @id end |
#location ⇒ Object
Returns the value of attribute location.
46 47 48 |
# File 'lib/usbmux/usbmux.rb', line 46 def location @location end |
#serial ⇒ Object
Returns the value of attribute serial.
46 47 48 |
# File 'lib/usbmux/usbmux.rb', line 46 def serial @serial end |
#usbprod ⇒ Object
Returns the value of attribute usbprod.
46 47 48 |
# File 'lib/usbmux/usbmux.rb', line 46 def usbprod @usbprod end |
Instance Method Details
#to_s ⇒ Object
55 56 57 |
# File 'lib/usbmux/usbmux.rb', line 55 def to_s "<MuxDevice: ID #{@id} ProdID 0x#{@usbprod.to_s.rjust(4, '0')} Serial '#{@serial}' Location 0x#{@usbprod.to_s.rjust(4, '0')}>" end |