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
51
52
53
|
# File 'lib/ie/interface_mtu.rb', line 51
def encode(fmt='n')
[interface_mtu].pack(fmt)
end
|
56
57
58
|
# File 'lib/ie/interface_mtu.rb', line 56
def to_hash
to_i
end
|
39
40
41
|
# File 'lib/ie/interface_mtu.rb', line 39
def to_i
interface_mtu
end
|
47
48
49
|
# File 'lib/ie/interface_mtu.rb', line 47
def to_s
self.class.to_s.split('::').last + ": #{to_i}"
end
|