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



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

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

.batteryObject

Read the battery level, return the value in percentage.



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

def self.battery
  adapter.battery
end

.beepObject



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

def self.beep
  adapter.beep
end

.brandObject



64
65
66
# File 'lib/device/system.rb', line 64

def self.brand
  adapter.brand
end

.modelObject



60
61
62
# File 'lib/device/system.rb', line 60

def self.model
  adapter.model
end

.power_supplyObject

Check if device is connected to any power supply

true Connected
false Not Connected


35
36
37
# File 'lib/device/system.rb', line 35

def self.power_supply
  adapter.power_supply
end

.rebootObject



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

def self.reboot
  adapter.reboot
end

.restartObject



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

def self.restart
  adapter.reboot
end

.update(path) ⇒ Object



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

def self.update(path)
  if File.exists? path
    adapter.update(path)
  end
end

.versionsObject



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

def self.versions
  adapter.versions
end