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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Dummy

Returns a new instance of Dummy.



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

def initialize(config)

end

Instance Attribute Details

#accountObject

Returns the value of attribute account.



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

def 
  @account
end

Instance Method Details

#balanceObject



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

def balance
  "Service is temporarily disabled"
end

#errorObject



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

def error
  nil
end

#modelObject



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

def model
  'Generic modem'
end

#signal_levelObject



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

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

#tickObject



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

def tick
  sleep 10
end

#versionObject



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

def version
  '8 Ultimate'
end