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 45
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 51
def opt_header
  "OPTION[#{opt},#{@name}]"
end
to_opt() click to toggle source
# File lib/dhcp/options.rb, line 59
def to_opt
  @opt.chr
end
to_s() click to toggle source
# File lib/dhcp/options.rb, line 55
def to_s
  opt_header
end