Class: HiddenHippo::Extractors::DhcpHostnameExtractor
- Inherits:
-
Object
- Object
- HiddenHippo::Extractors::DhcpHostnameExtractor
- Defined in:
- lib/hidden_hippo/extractors/dhcp_hostname_extractor.rb
Instance Method Summary collapse
- #call(packet) ⇒ Object
-
#initialize(queue) ⇒ DhcpHostnameExtractor
constructor
A new instance of DhcpHostnameExtractor.
Constructor Details
#initialize(queue) ⇒ DhcpHostnameExtractor
Returns a new instance of DhcpHostnameExtractor.
6 7 8 |
# File 'lib/hidden_hippo/extractors/dhcp_hostname_extractor.rb', line 6 def initialize(queue) @queue = queue end |
Instance Method Details
#call(packet) ⇒ Object
10 11 12 13 |
# File 'lib/hidden_hippo/extractors/dhcp_hostname_extractor.rb', line 10 def call(packet) @queue << Update.new(packet.mac_src, {hostname: packet.fqdn_name || packet.opt_hostname}) end |