Class: ARPTable
- Inherits:
-
Object
- Object
- ARPTable
- Defined in:
- lib/netutils/arp.rb
Defined Under Namespace
Classes: ARP
Instance Attribute Summary collapse
-
#arps ⇒ Object
readonly
Returns the value of attribute arps.
Instance Method Summary collapse
- #[](ia) ⇒ Object
- #add(ia, ma, interface, static) ⇒ Object
-
#initialize ⇒ ARPTable
constructor
A new instance of ARPTable.
Constructor Details
#initialize ⇒ ARPTable
Returns a new instance of ARPTable.
17 18 19 |
# File 'lib/netutils/arp.rb', line 17 def initialize @arps = {} end |
Instance Attribute Details
#arps ⇒ Object (readonly)
Returns the value of attribute arps.
15 16 17 |
# File 'lib/netutils/arp.rb', line 15 def arps @arps end |
Instance Method Details
#[](ia) ⇒ Object
25 26 27 |
# File 'lib/netutils/arp.rb', line 25 def [](ia) return @arps[ia] end |
#add(ia, ma, interface, static) ⇒ Object
21 22 23 |
# File 'lib/netutils/arp.rb', line 21 def add(ia, ma, interface, static) @arps[ia] = ARP.new(ia, ma, interface, static) end |