Class: DNS::QClass

Inherits:
Class
  • Object
show all
Defined in:
lib/faildns/qclass.rb

Overview

– QCLASS fields appear in the question section of a query. QCLASS values are a superset of CLASS values; every CLASS is a valid QCLASS. In addition to CLASS values, the following QCLASSes are defined:

  • 255 any class

++

Constant Summary collapse

Values =
{
  254 => :NONE,
  255 => :ANY
}

Instance Attribute Summary

Attributes inherited from Class

#value

Instance Method Summary collapse

Methods inherited from Class

#==, length, #pack, parse

Constructor Details

#initialize(value) ⇒ QClass

Returns a new instance of QClass.



38
39
40
# File 'lib/faildns/qclass.rb', line 38

def initialize (value)
  super(value)
end

Instance Method Details

#to_sObject



46
47
48
# File 'lib/faildns/qclass.rb', line 46

def to_s
  (Values[@value] || Class::Values[@value]).to_s
end

#to_symObject



42
43
44
# File 'lib/faildns/qclass.rb', line 42

def to_sym
  Values[@value] || Class::Values[@value]
end