Class: DHCP::UserClassInformationOption

Inherits:
Option
  • Object
show all
Defined in:
lib/net/dhcp/options.rb

Overview

see: rfc3004

Instance Attribute Summary

Attributes inherited from Option

#len, #payload, #type

Instance Method Summary collapse

Methods inherited from Option

#eql?, #pack, #to_a

Constructor Details

#initialize(params = {}) ⇒ UserClassInformationOption

Returns a new instance of UserClassInformationOption.



506
507
508
509
510
# File 'lib/net/dhcp/options.rb', line 506

def initialize(params={})
  params[:type] = $DHCP_USERCLASS
  params[:payload] = params.fetch(:payload, [0x67, 0x50, 0x58, 0x45] )
  super(params)
end

Instance Method Details

#to_sObject



512
513
514
# File 'lib/net/dhcp/options.rb', line 512

def to_s
  "UserClassInformation = #{self.payload.pack('C*')}"
end