Class: Presence::MACList

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeMACList

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_foundObject

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