Class: AdbDevice::Device
- Inherits:
-
Object
- Object
- AdbDevice::Device
- Defined in:
- lib/adb_device.rb
Instance Method Summary collapse
- #brand ⇒ Object
-
#initialize(sn) ⇒ Device
constructor
A new instance of Device.
- #model ⇒ Object
Constructor Details
#initialize(sn) ⇒ Device
Returns a new instance of Device.
7 8 9 |
# File 'lib/adb_device.rb', line 7 def initialize(sn) @sn = sn end |
Instance Method Details
#brand ⇒ Object
11 12 13 14 |
# File 'lib/adb_device.rb', line 11 def brand output = `adb -s #{@sn} shell getprop ro.product.brand` brand = output.tr("\n", "") end |
#model ⇒ Object
16 17 18 19 |
# File 'lib/adb_device.rb', line 16 def model output = `adb -s #{@sn} shell getprop ro.product.model` model = output.tr("\n", "") end |