123456789_123456789_123456789_123456789_123456789_

Class: Gem::Resolv::DNS::Resource

Relationships & Source Files
Namespace Children
Modules:
IN
Classes:
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Query
Instance Chain:
self, Query
Inherits: Gem::Resolv::DNS::Query
Defined in: lib/rubygems/vendor/resolv/lib/resolv.rb

Overview

A DNS resource abstract class.

Constant Summary

Class Method Summary

Query - Inherited

Instance Attribute Summary

  • #ttl readonly

    Remaining Time To Live for this Resource.

Instance Method Summary

Query - Inherited

Class Method Details

.decode_rdata(msg)

This method is for internal use only.

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2104

def self.decode_rdata(msg) # :nodoc:
  raise NotImplementedError.new
end

.get_class(type_value, class_value)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2135

def self.get_class(type_value, class_value) # :nodoc:
  return ClassHash[[type_value, class_value]] ||
         Generic.create(type_value, class_value)
end

Instance Attribute Details

#ttl (readonly)

Remaining Time To Live for this Resource.

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2096

attr_reader :ttl

Instance Method Details

#==(other)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2108

def ==(other) # :nodoc:
  return false unless self.class == other.class
  s_ivars = self.instance_variables
  s_ivars.sort!
  s_ivars.delete :@ttl
  o_ivars = other.instance_variables
  o_ivars.sort!
  o_ivars.delete :@ttl
  return s_ivars == o_ivars &&
    s_ivars.collect {|name| self.instance_variable_get name} ==
      o_ivars.collect {|name| other.instance_variable_get name}
end

#encode_rdata(msg)

This method is for internal use only.

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2100

def encode_rdata(msg) # :nodoc:
  raise NotImplementedError.new
end

#eql?(other) ⇒ Boolean

This method is for internal use only.
[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2121

def eql?(other) # :nodoc:
  return self == other
end

#hash

This method is for internal use only.
[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2125

def hash # :nodoc:
  h = 0
  vars = self.instance_variables
  vars.delete :@ttl
  vars.each {|name|
    h ^= self.instance_variable_get(name).hash
  }
  return h
end