Class: Biscuit::Monitor::SignalStrength
- Inherits:
-
Object
- Object
- Biscuit::Monitor::SignalStrength
- Defined in:
- lib/biscuit-monitor/signal_strength.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #cinr ⇒ Object
- #exec ⇒ Object
-
#initialize(device_ip) ⇒ SignalStrength
constructor
A new instance of SignalStrength.
- #rssi ⇒ Object
Constructor Details
#initialize(device_ip) ⇒ SignalStrength
Returns a new instance of SignalStrength.
11 12 13 |
# File 'lib/biscuit-monitor/signal_strength.rb', line 11 def initialize(device_ip) @device_ip = device_ip end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
9 10 11 |
# File 'lib/biscuit-monitor/signal_strength.rb', line 9 def response @response end |
Instance Method Details
#cinr ⇒ Object
20 21 22 |
# File 'lib/biscuit-monitor/signal_strength.rb', line 20 def cinr Cinr.new(@response[:cinr]). end |
#exec ⇒ Object
15 16 17 18 |
# File 'lib/biscuit-monitor/signal_strength.rb', line 15 def exec @response = parse(parse_javascript_to_json(Net::HTTP.get(device_uri)))[:data] @response.merge!(captured_on: Time.now.utc) end |