Class: Dovado::Router::Info::Signal
- Inherits:
-
Object
- Object
- Dovado::Router::Info::Signal
- Defined in:
- lib/dovado/router/info/signal.rb
Overview
Signal Strength object
Instance Attribute Summary collapse
-
#network ⇒ String
readonly
Network type.
-
#noise ⇒ Integer
readonly
Signal noise level in dBm.
-
#strength ⇒ Integer
readonly
Strength as a percentage.
Instance Method Summary collapse
-
#initialize(args) ⇒ Signal
constructor
A new instance of Signal.
Constructor Details
#initialize(args) ⇒ Signal
Returns a new instance of Signal.
29 30 31 32 33 |
# File 'lib/dovado/router/info/signal.rb', line 29 def initialize(args) @strength = args[:strength].to_i @noise = args[:noise].to_i @network = args[:network] end |
Instance Attribute Details
#network ⇒ String (readonly)
Network type
One of:
-
2G
-
3G
-
4G
27 28 29 |
# File 'lib/dovado/router/info/signal.rb', line 27 def network @network end |
#noise ⇒ Integer (readonly)
Signal noise level in dBm
17 18 19 |
# File 'lib/dovado/router/info/signal.rb', line 17 def noise @noise end |
#strength ⇒ Integer (readonly)
Strength as a percentage
12 13 14 |
# File 'lib/dovado/router/info/signal.rb', line 12 def strength @strength end |