Class: GeoStalker::Locator::Darwin

Inherits:
Base
  • Object
show all
Defined in:
lib/geo_stalker/locator/darwin.rb

Constant Summary collapse

COMMAND =
"/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -s -x"

Constants inherited from Base

Base::ENDPOINT

Instance Method Summary collapse

Methods inherited from Base

#initialize, #location

Constructor Details

This class inherits a constructor from GeoStalker::Locator::Base

Instance Method Details

#wifi_access_pointsObject



8
9
10
11
12
13
14
15
16
17
# File 'lib/geo_stalker/locator/darwin.rb', line 8

def wifi_access_points
  xml = `#{COMMAND}`
  Plist.parse_xml(xml).map do |data|
    {
      macAddress: data["BSSID"],
      signalStrength: data["RSSI"],
      channel: data["CHANNEL"],
    }
  end
end