class DHCP::Opt

Base class from which all DHCP options in a DHCP packet derive:

Attributes

name[R]
opt[R]

Public Class Methods

new(opt, name, ignore=nil) click to toggle source
# File lib/dhcp/options.rb, line 13
def initialize(opt, name, ignore=nil)
  @opt  = opt
  @name = name
end

Public Instance Methods

opt_header() click to toggle source
# File lib/dhcp/options.rb, line 19
def opt_header
  "OPTION[#{opt},#{@name}]"
end
to_opt() click to toggle source
# File lib/dhcp/options.rb, line 27
def to_opt
  @opt.chr
end
to_s() click to toggle source
# File lib/dhcp/options.rb, line 23
def to_s
  opt_header
end