class WillowRun::Scanner
Public Instance Methods
initialzie(opts=false)
click to toggle source
# File lib/willow_run/scanner.rb, line 4 def initialzie(opts=false) if opts[:scan] if opts[:ssid] scan(opts[:ssid]) else scan end end true end
manage_output(stdout, status)
click to toggle source
# File lib/willow_run/scanner.rb, line 20 def manage_output(stdout, status) if status.success? Parser.new.parse(stdout) else # custom error? false end end
scan(ssid="")
click to toggle source
# File lib/willow_run/scanner.rb, line 15 def scan(ssid="") o, s = Open3.capture2("#{AIRPORT} -x -s '#{ssid}'") manage_output(o, s) end