Class: Presence::MACList
- Inherits:
-
Object
- Object
- Presence::MACList
- Defined in:
- lib/presence/listeners/mac_list.rb
Overview
Scanner listener that stores a hash of MAC address to IP address for all MACs found by the scanner.
Instance Attribute Summary collapse
-
#macs_found ⇒ Object
Returns the value of attribute macs_found.
Instance Method Summary collapse
-
#initialize ⇒ MACList
constructor
A new instance of MACList.
- #mac_found(ip, mac) ⇒ Object
Constructor Details
#initialize ⇒ MACList
Returns a new instance of MACList.
7 8 9 |
# File 'lib/presence/listeners/mac_list.rb', line 7 def initialize @macs_found = {} end |
Instance Attribute Details
#macs_found ⇒ Object
Returns the value of attribute macs_found.
5 6 7 |
# File 'lib/presence/listeners/mac_list.rb', line 5 def macs_found @macs_found end |
Instance Method Details
#mac_found(ip, mac) ⇒ Object
11 12 13 |
# File 'lib/presence/listeners/mac_list.rb', line 11 def mac_found(ip, mac) @macs_found[mac] = ip end |