Class: Warpaint::NetworkCollection

Inherits:
OrderedCollection show all
Defined in:
lib/warpaint/network_collection.rb

Instance Method Summary collapse

Methods inherited from OrderedCollection

#closest_to

Constructor Details

#initialize(time_adjustment = 0) ⇒ NetworkCollection

Returns a new instance of NetworkCollection.



5
6
7
8
# File 'lib/warpaint/network_collection.rb', line 5

def initialize(time_adjustment = 0)
  @time_adjustment = time_adjustment
  super
end

Instance Method Details

#add_wireless_network(network) ⇒ Object



10
11
12
# File 'lib/warpaint/network_collection.rb', line 10

def add_wireless_network(network)
  self[network[:last_time] + @time_adjustment] = { :essid => network[:essid], :encryption => network[:encryption] }
end