Class: WpaCliRuby::WpaCli::ScanResult
- Inherits:
-
Struct
- Object
- Struct
- WpaCliRuby::WpaCli::ScanResult
- Defined in:
- lib/wpa_cli_ruby/wpa_cli.rb
Instance Attribute Summary collapse
-
#bssid ⇒ Object
Returns the value of attribute bssid.
-
#flags ⇒ Object
Returns the value of attribute flags.
-
#frequency ⇒ Object
Returns the value of attribute frequency.
-
#signal_level ⇒ Object
Returns the value of attribute signal_level.
-
#ssid ⇒ Object
Returns the value of attribute ssid.
Class Method Summary collapse
-
.from_string(string) ⇒ Object
Instantiate from a tab delimited string (as given by ‘wpa_cli scan_results`).
Instance Method Summary collapse
-
#initialize(*args) ⇒ ScanResult
constructor
A new instance of ScanResult.
Constructor Details
#initialize(*args) ⇒ ScanResult
Returns a new instance of ScanResult.
10 11 12 13 14 |
# File 'lib/wpa_cli_ruby/wpa_cli.rb', line 10 def initialize(*args) super(*args) self.signal_level = self.signal_level.to_i self.frequency = self.frequency.to_i end |
Instance Attribute Details
#bssid ⇒ Object
Returns the value of attribute bssid
9 10 11 |
# File 'lib/wpa_cli_ruby/wpa_cli.rb', line 9 def bssid @bssid end |
#flags ⇒ Object
Returns the value of attribute flags
9 10 11 |
# File 'lib/wpa_cli_ruby/wpa_cli.rb', line 9 def flags @flags end |
#frequency ⇒ Object
Returns the value of attribute frequency
9 10 11 |
# File 'lib/wpa_cli_ruby/wpa_cli.rb', line 9 def frequency @frequency end |
#signal_level ⇒ Object
Returns the value of attribute signal_level
9 10 11 |
# File 'lib/wpa_cli_ruby/wpa_cli.rb', line 9 def signal_level @signal_level end |
#ssid ⇒ Object
Returns the value of attribute ssid
9 10 11 |
# File 'lib/wpa_cli_ruby/wpa_cli.rb', line 9 def ssid @ssid end |
Class Method Details
.from_string(string) ⇒ Object
Instantiate from a tab delimited string (as given by ‘wpa_cli scan_results`)
19 20 21 |
# File 'lib/wpa_cli_ruby/wpa_cli.rb', line 19 def self.from_string(string) new(*string.split("\t")) end |