Class: VRFTable
Defined Under Namespace
Classes: VRF
Instance Method Summary collapse
- #[](name) ⇒ Object
- #add(name, rd) ⇒ Object
- #each ⇒ Object
- #empty? ⇒ Boolean
-
#initialize ⇒ VRFTable
constructor
A new instance of VRFTable.
Constructor Details
#initialize ⇒ VRFTable
Returns a new instance of VRFTable.
20 21 22 |
# File 'lib/netutils/vrf.rb', line 20 def initialize @table = {} end |
Instance Method Details
#[](name) ⇒ Object
30 31 32 |
# File 'lib/netutils/vrf.rb', line 30 def [](name) return @table[name] end |
#add(name, rd) ⇒ Object
24 25 26 27 28 |
# File 'lib/netutils/vrf.rb', line 24 def add(name, rd) vrf = VRF.new(name, rd) @table[name] = vrf return vrf end |
#each ⇒ Object
39 40 41 |
# File 'lib/netutils/vrf.rb', line 39 def each @table.each { |vrf| yield vrf } end |
#empty? ⇒ Boolean
35 36 37 |
# File 'lib/netutils/vrf.rb', line 35 def empty? @table.empty? end |