Class: Resolv::DNS::Resource
Overview
A DNS resource abstract class.
Direct Known Subclasses
DomainName, Generic, HINFO, IN::A, IN::AAAA, IN::SRV, IN::WKS, MINFO, MX, SOA, TXT
Defined Under Namespace
Modules: IN Classes: ANY, CNAME, DomainName, Generic, HINFO, MINFO, MX, NS, PTR, SOA, TXT
Constant Summary collapse
- ClassHash =
:nodoc:
{}
- ClassValue =
Standard (class generic) RRs
nil- ClassInsensitiveTypes =
:nodoc:
[ # :nodoc: NS, CNAME, SOA, PTR, HINFO, MINFO, MX, TXT, ANY ]
Instance Attribute Summary collapse
-
#ttl ⇒ Object
readonly
Remaining Time To Live for this Resource.
Class Method Summary collapse
-
.decode_rdata(msg) ⇒ Object
:nodoc:.
-
.get_class(type_value, class_value) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#==(other) ⇒ Object
:nodoc:.
-
#encode_rdata(msg) ⇒ Object
:nodoc:.
-
#eql?(other) ⇒ Boolean
:nodoc:.
-
#hash ⇒ Object
:nodoc:.
Instance Attribute Details
#ttl ⇒ Object (readonly)
Remaining Time To Live for this Resource.
1435 1436 1437 |
# File 'lib/resolv.rb', line 1435 def ttl @ttl end |
Class Method Details
.decode_rdata(msg) ⇒ Object
:nodoc:
1443 1444 1445 |
# File 'lib/resolv.rb', line 1443 def self.decode_rdata(msg) # :nodoc: raise NotImplementedError.new end |
Instance Method Details
#==(other) ⇒ Object
:nodoc:
1447 1448 1449 1450 1451 1452 |
# File 'lib/resolv.rb', line 1447 def ==(other) # :nodoc: 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 |
#encode_rdata(msg) ⇒ Object
:nodoc:
1439 1440 1441 |
# File 'lib/resolv.rb', line 1439 def encode_rdata(msg) # :nodoc: raise NotImplementedError.new end |
#eql?(other) ⇒ Boolean
:nodoc:
1454 1455 1456 |
# File 'lib/resolv.rb', line 1454 def eql?(other) # :nodoc: return self == other end |
#hash ⇒ Object
:nodoc:
1458 1459 1460 1461 1462 1463 1464 |
# File 'lib/resolv.rb', line 1458 def hash # :nodoc: h = 0 self.instance_variables.each {|name| h ^= self.instance_eval("#{name}.hash") } return h end |