Class: GeoStalker::Locator::Linux
- Defined in:
- lib/geo_stalker/locator/linux.rb
Constant Summary collapse
- COMMAND =
"iwlist wlan0 scan"
Constants inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from GeoStalker::Locator::Base
Instance Method Details
#wifi_access_points ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/geo_stalker/locator/linux.rb', line 6 def wifi_access_points lines = `#{COMMAND}`.split(/[\r\n]/) lines.map do |line| { macAddress: line.split(/\s+/).last, signalStrength: line.scan(/Signal level[:=](\-?\d+)/)[0][0].to_i, } end end |