Class: Device::System

Inherits:
Object
  • Object
show all
Defined in:
lib/device/system.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.backlightObject

Returns the value of attribute backlight.



5
6
7
# File 'lib/device/system.rb', line 5

def backlight
  @backlight
end

.klassObject

Returns the value of attribute klass.



6
7
8
# File 'lib/device/system.rb', line 6

def klass
  @klass
end

.serialObject (readonly)

Returns the value of attribute serial.



5
6
7
# File 'lib/device/system.rb', line 5

def serial
  @serial
end

Class Method Details

.adapterObject



9
10
11
# File 'lib/device/system.rb', line 9

def self.adapter
  Device.adapter::System
end

.appObject



68
69
70
# File 'lib/device/system.rb', line 68

def self.app
  self.klass.to_s.downcase
end

.batteryObject

Read the battery level, return the value in percentage.



44
45
46
# File 'lib/device/system.rb', line 44

def self.battery
  adapter.battery
end

.beepObject



48
49
50
# File 'lib/device/system.rb', line 48

def self.beep
  adapter.beep
end

.brandObject



76
77
78
# File 'lib/device/system.rb', line 76

def self.brand
  adapter.brand
end

.modelObject



72
73
74
# File 'lib/device/system.rb', line 72

def self.model
  adapter.model
end

.power_supplyObject

Check if device is connected to any power supply

true Connected
false Not Connected


39
40
41
# File 'lib/device/system.rb', line 39

def self.power_supply
  adapter.power_supply
end

.rebootObject



56
57
58
# File 'lib/device/system.rb', line 56

def self.reboot
  adapter.reboot
end

.restartObject



52
53
54
# File 'lib/device/system.rb', line 52

def self.restart
  adapter.reboot
end

.teardownObject



13
14
15
# File 'lib/device/system.rb', line 13

def self.teardown
  adapter.teardown if adapter.respond_to?(:teardown)
end

.update(path) ⇒ Object



84
85
86
# File 'lib/device/system.rb', line 84

def self.update(path)
  adapter.update(path)
end

.versionsObject



80
81
82
# File 'lib/device/system.rb', line 80

def self.versions
  adapter.versions
end