Class: Smartware::Driver::Modem::Dummy

Inherits:
Object
  • Object
show all
Defined in:
lib/smartware/drivers/modem/dummy.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Dummy

Returns a new instance of Dummy.



8
9
10
# File 'lib/smartware/drivers/modem/dummy.rb', line 8

def initialize(config)

end

Instance Method Details

#balanceObject



29
30
31
# File 'lib/smartware/drivers/modem/dummy.rb', line 29

def balance
  "Service is temporarily disabled"
end

#errorObject



20
21
22
# File 'lib/smartware/drivers/modem/dummy.rb', line 20

def error
  nil
end

#modelObject



12
13
14
# File 'lib/smartware/drivers/modem/dummy.rb', line 12

def model
  'Generic modem'
end

#signal_levelObject



24
25
26
27
# File 'lib/smartware/drivers/modem/dummy.rb', line 24

def signal_level
  res = %w(-55 -51 -57 -53).sample
  "#{res} dbm"
end

#tickObject



33
34
35
# File 'lib/smartware/drivers/modem/dummy.rb', line 33

def tick
  sleep 10
end

#versionObject



16
17
18
# File 'lib/smartware/drivers/modem/dummy.rb', line 16

def version
  '8 Ultimate'
end