Sha256: 9f85c667ca8ff49186b5e4a786b3c0b706550a10569de61b6cb469db3305a3bf
Contents?: true
Size: 478 Bytes
Versions: 6
Compression:
Stored size: 478 Bytes
Contents
class AccessPointList include WpaCliRuby def initialize(cli_client = WpaCli.new) cli_client.scan @access_points = cli_client.scan_results end def access_points @access_points. group_by {|network| network.ssid}. map {|ssid, network_group| network_group}. map {|network_group| network_group.sort_by { |network| network.signal_level}.reverse.take(1)}. flatten. sort_by { |network| network.signal_level }. reverse end end
Version data entries
6 entries across 6 versions & 1 rubygems