# Resolv::DNS::Resource (Class)

In: | resolv.rb
Parent: | Query

## Methods

== decode_rdata encode_rdata eql? get_class hash

## Constants

ClassHash | = | {}
ClassValue | = | nil
| Standard (class generic) RRs
ClassInsensitiveTypes | = | [ NS, CNAME, SOA, PTR, HINFO, MINFO, MX, TXT, ANY

## Classes and Modules

Module Resolv::DNS::Resource::IN
::Class Resolv::DNS::Resource::IN::A
::Class Resolv::DNS::Resource::IN::AAAA
::Class Resolv::DNS::Resource::IN::WKS
Class Resolv::DNS::Resource::ANY
Class Resolv::DNS::Resource::CNAME
Class Resolv::DNS::Resource::DomainName
Class Resolv::DNS::Resource::Generic
Class Resolv::DNS::Resource::HINFO
Class Resolv::DNS::Resource::MINFO
Class Resolv::DNS::Resource::MX
Class Resolv::DNS::Resource::NS
Class Resolv::DNS::Resource::PTR
Class Resolv::DNS::Resource::SOA
Class Resolv::DNS::Resource::TXT

## Public Class methods

decode_rdata(msg)

[Source]

    # File resolv.rb, line 1267
          def self.decode_rdata(msg)
            raise NotImplementedError.new
          end

get_class(type_value, class_value)

[Source]

    # File resolv.rb, line 1290
          def self.get_class(type_value, class_value)
            return ClassHash[[type_value, class_value]] ||
                   Generic.create(type_value, class_value)
          end

## Public Instance methods

encode_rdata(msg)

[Source]

    # File resolv.rb, line 1263
          def encode_rdata(msg)
            raise NotImplementedError.new
          end

==(other)

[Source]

    # File resolv.rb, line 1271
          def ==(other)
            return self.class == other.class &&
              self.instance_variables == other.instance_variables &&
              self.instance_variables.collect {|name| self.instance_eval name} ==
                other.instance_variables.collect {|name| other.instance_eval name}
          end

eql?(other)

[Source]

    # File resolv.rb, line 1278
          def eql?(other)
            return self == other
          end

hash()

[Source]

    # File resolv.rb, line 1282
          def hash
            h = 0
            self.instance_variables.each {|name|
              h ^= self.instance_eval("#{name}.hash")
            }
            return h
          end

[Validate]