class Lib::BOOTP::Packet::BootFile
Public Class Methods
new(file = '.')
click to toggle source
# File lib/lib/bootp/packet/boot_file.rb, line 18 def initialize(file = '.') raise ArgumentError, "Can't convert #{file.class.name} to String" unless file.respond_to? :to_s raise ArgumentError, "Given Server Host Name is to long: #{file}" if file.to_s.size > 128 @file = file.to_s end
unpack(packet)
click to toggle source
# File lib/lib/bootp/packet/boot_file.rb, line 32 def self.unpack(packet) new packet.unpack('a128').first.to_s end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/lib/bootp/packet/boot_file.rb, line 24 def <=>(other) self.to_s <=> other.to_s end
pack()
click to toggle source
# File lib/lib/bootp/packet/boot_file.rb, line 28 def pack [@file].pack('a128') end