Class: Rubyconf::WirelessNetwork
- Inherits:
-
Object
- Object
- Rubyconf::WirelessNetwork
- Defined in:
- lib/rubyconf.rb
Instance Method Summary collapse
- #bssid ⇒ Object
- #channel ⇒ Object
-
#initialize(data) ⇒ WirelessNetwork
constructor
A new instance of WirelessNetwork.
- #noise ⇒ Object
- #rssi ⇒ Object
- #show ⇒ Object
- #ssid ⇒ Object
Constructor Details
#initialize(data) ⇒ WirelessNetwork
Returns a new instance of WirelessNetwork.
11 12 13 |
# File 'lib/rubyconf.rb', line 11 def initialize(data) @data = data end |
Instance Method Details
#bssid ⇒ Object
15 16 17 |
# File 'lib/rubyconf.rb', line 15 def bssid @data["BSSID"] end |
#channel ⇒ Object
19 20 21 |
# File 'lib/rubyconf.rb', line 19 def channel @data["CHANNEL"] end |
#noise ⇒ Object
27 28 29 |
# File 'lib/rubyconf.rb', line 27 def noise @data["NOISE"] end |
#rssi ⇒ Object
31 32 33 |
# File 'lib/rubyconf.rb', line 31 def rssi @data["RSSI"] end |
#show ⇒ Object
35 36 37 |
# File 'lib/rubyconf.rb', line 35 def show printf "%20s %4s %d\n", ssid, rssi, channel end |
#ssid ⇒ Object
23 24 25 |
# File 'lib/rubyconf.rb', line 23 def ssid @ssid ||= @data["SSID"].string end |