Class: Warpaint::NetworkCollection
- Inherits:
-
OrderedCollection
- Object
- RBTree
- OrderedCollection
- Warpaint::NetworkCollection
- Defined in:
- lib/warpaint/network_collection.rb
Instance Method Summary collapse
- #add_wireless_network(network) ⇒ Object
-
#initialize(time_adjustment = 0) ⇒ NetworkCollection
constructor
A new instance of NetworkCollection.
Methods inherited from OrderedCollection
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 |