Class: Smartware::Interface::Modem
- Inherits:
-
Smartware::Interface
- Object
- Smartware::Interface
- Smartware::Interface::Modem
- Defined in:
- lib/smartware/interfaces/modem.rb
Constant Summary collapse
- MODEM_NOT_AVAILABLE =
1
Instance Method Summary collapse
- #balance ⇒ Object
-
#initialize(config, service) ⇒ Modem
constructor
A new instance of Modem.
- #signal_level ⇒ Object
Constructor Details
#initialize(config, service) ⇒ Modem
Returns a new instance of Modem.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/smartware/interfaces/modem.rb', line 6 def initialize(config, service) super @device.account = method(:account) update_status :balance, '' update_status :signal_level, '' @session = Thread.new &method(:poll) end |
Instance Method Details
#balance ⇒ Object
17 18 19 |
# File 'lib/smartware/interfaces/modem.rb', line 17 def balance self.status[:balance][0] end |
#signal_level ⇒ Object
21 22 23 |
# File 'lib/smartware/interfaces/modem.rb', line 21 def signal_level self.status[:signal_level][0] end |