Class: Resolv::DNS::Resource
- Defined in:
- lib/logstash/patches/resolv_9270.rb
Overview
A DNS resource abstract class.
Direct Known Subclasses
DomainName, Generic, HINFO, IN::A, IN::AAAA, IN::SRV, IN::WKS, LOC, MINFO, MX, SOA, TXT
Defined Under Namespace
Modules: IN Classes: ANY, CNAME, DomainName, Generic, HINFO, LOC, 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, LOC, 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.
1719 1720 1721 |
# File 'lib/logstash/patches/resolv_9270.rb', line 1719 def ttl @ttl end |
Class Method Details
.decode_rdata(msg) ⇒ Object
:nodoc:
1727 1728 1729 |
# File 'lib/logstash/patches/resolv_9270.rb', line 1727 def self.decode_rdata(msg) # :nodoc: raise NotImplementedError.new end |
Instance Method Details
#==(other) ⇒ Object
:nodoc:
1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 |
# File 'lib/logstash/patches/resolv_9270.rb', line 1731 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) ⇒ Object
:nodoc:
1723 1724 1725 |
# File 'lib/logstash/patches/resolv_9270.rb', line 1723 def encode_rdata(msg) # :nodoc: raise NotImplementedError.new end |
#eql?(other) ⇒ Boolean
:nodoc:
1744 1745 1746 |
# File 'lib/logstash/patches/resolv_9270.rb', line 1744 def eql?(other) # :nodoc: return self == other end |
#hash ⇒ Object
:nodoc:
1748 1749 1750 1751 1752 1753 1754 1755 1756 |
# File 'lib/logstash/patches/resolv_9270.rb', line 1748 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 |