class ARPScan::Host
Abstracts replying hosts from the arp-scan output.
Attributes
ip_addr[R]
The IP address of the host.
mac[R]
The MAC address of the host.
oui[R]
OUI information about the host.
Public Class Methods
new(ip_addr, mac, oui)
click to toggle source
Create a new hsot. IP address, MAC address and OUI information are expected.
# File lib/arp_scan/host.rb, line 22 def initialize(ip_addr, mac, oui) @ip_addr = ip_addr @mac = mac @oui = oui end
Public Instance Methods
to_array()
click to toggle source
Returns an array representation of the Host
object.
# File lib/arp_scan/host.rb, line 38 def to_array [@ip_addr, @mac, @oui] end
to_hash()
click to toggle source
Returns a hash representation of the Host
object.
# File lib/arp_scan/host.rb, line 30 def to_hash { ip_addr: @ip_addr, mac: @mac, oui: @oui } end