Class: Resolv::DNS::Resource::Generic
- Inherits:
-
Resolv::DNS::Resource
- Object
- Query
- Resolv::DNS::Resource
- Resolv::DNS::Resource::Generic
- Defined in:
- lib/logstash/patches/resolv_9270.rb
Overview
A generic resource abstract class.
Constant Summary
Constants inherited from Resolv::DNS::Resource
ClassHash, ClassInsensitiveTypes, ClassValue
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Data for this generic resource.
Attributes inherited from Resolv::DNS::Resource
Class Method Summary collapse
-
.create(type_value, class_value) ⇒ Object
:nodoc:.
-
.decode_rdata(msg) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#encode_rdata(msg) ⇒ Object
:nodoc:.
-
#initialize(data) ⇒ Generic
constructor
Creates a new generic resource.
Methods inherited from Resolv::DNS::Resource
Constructor Details
#initialize(data) ⇒ Generic
Creates a new generic resource.
1771 1772 1773 |
# File 'lib/logstash/patches/resolv_9270.rb', line 1771 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Data for this generic resource.
1778 1779 1780 |
# File 'lib/logstash/patches/resolv_9270.rb', line 1778 def data @data end |
Class Method Details
.create(type_value, class_value) ⇒ Object
:nodoc:
1788 1789 1790 1791 1792 1793 1794 1795 |
# File 'lib/logstash/patches/resolv_9270.rb', line 1788 def self.create(type_value, class_value) # :nodoc: c = Class.new(Generic) c.const_set(:TypeValue, type_value) c.const_set(:ClassValue, class_value) Generic.const_set("Type#{type_value}_Class#{class_value}", c) ClassHash[[type_value, class_value]] = c return c end |
.decode_rdata(msg) ⇒ Object
:nodoc:
1784 1785 1786 |
# File 'lib/logstash/patches/resolv_9270.rb', line 1784 def self.decode_rdata(msg) # :nodoc: return self.new(msg.get_bytes) end |
Instance Method Details
#encode_rdata(msg) ⇒ Object
:nodoc:
1780 1781 1782 |
# File 'lib/logstash/patches/resolv_9270.rb', line 1780 def encode_rdata(msg) # :nodoc: msg.put_bytes(data) end |