Class: OSPFv2::ExternalRoute
- Inherits:
-
ExternalRoute_Base
- Object
- ExternalRoute_Base
- OSPFv2::ExternalRoute
- Defined in:
- lib/ie/external_route.rb
Constant Summary
Constants inherited from ExternalRoute_Base
OSPFv2::ExternalRoute_Base::ForwardingAddress
Instance Attribute Summary
Attributes inherited from ExternalRoute_Base
#forwarding_address, #metric, #mt_id, #tag, #type
Instance Method Summary collapse
-
#initialize(arg = {}) ⇒ ExternalRoute
constructor
A new instance of ExternalRoute.
- #to_hash ⇒ Object
Methods inherited from ExternalRoute_Base
#encode, new_hash, #parse, #to_s
Methods included from Common
#ivar_to_klassname, #ivars, #set
Constructor Details
#initialize(arg = {}) ⇒ ExternalRoute
Returns a new instance of ExternalRoute.
147 148 149 150 151 152 153 |
# File 'lib/ie/external_route.rb', line 147 def initialize(arg={}) if arg.is_a?(Hash) @forwarding_address = ForwardingAddress.new raise ArgumentError, "ID should be 0" if arg[:id] and arg[:mt_id]>0 end super end |
Instance Method Details
#to_hash ⇒ Object
154 155 156 157 158 |
# File 'lib/ie/external_route.rb', line 154 def to_hash h = super h.delete(:mt_id) h end |