class Lib::BOOTP::Packet::HardwareAddressLength
Public Class Methods
new(hlen=6)
click to toggle source
# File lib/lib/bootp/packet/hardware_address_length.rb, line 19 def initialize(hlen=6) @hlen = hlen.to_i end
unpack(hlen)
click to toggle source
# File lib/lib/bootp/packet/hardware_address_length.rb, line 31 def self.unpack(hlen) self.new hlen.unpack('C').first end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/lib/bootp/packet/hardware_address_length.rb, line 27 def <=>(other) self.to_i <=> other.to_i end
pack()
click to toggle source
# File lib/lib/bootp/packet/hardware_address_length.rb, line 23 def pack [@hlen.to_i].pack('C') end