Class: OSPFv2::InterfaceMtu
Instance Method Summary
collapse
Methods included from Common
#ivar_to_klassname, #ivars, #set
Constructor Details
#initialize(interface_mtu = 1500) ⇒ InterfaceMtu
Returns a new instance of InterfaceMtu.
35
36
37
|
# File 'lib/ie/interface_mtu.rb', line 35
def initialize(interface_mtu=1500)
self.interface_mtu=interface_mtu
end
|
Instance Method Details
#encode(fmt = 'n') ⇒ Object
Also known as:
enc
52
53
54
|
# File 'lib/ie/interface_mtu.rb', line 52
def encode(fmt='n')
[interface_mtu].pack(fmt)
end
|
#number_of_lsa ⇒ Object
Also known as:
n0flsa
57
58
59
|
# File 'lib/ie/interface_mtu.rb', line 57
def to_hash
to_i
end
|
39
40
41
|
# File 'lib/ie/interface_mtu.rb', line 39
def to_i
interface_mtu
end
|
48
49
50
|
# File 'lib/ie/interface_mtu.rb', line 48
def to_s
self.class.to_s.split('::').last + ": #{to_i}"
end
|