Class: Resolv::DNS::Resource::Generic
- Inherits:
-
Resolv::DNS::Resource
- Object
- Query
- Resolv::DNS::Resource
- Resolv::DNS::Resource::Generic
- Defined in:
- lib/logmerge/resolv.rb
Constant Summary
Constants inherited from Resolv::DNS::Resource
ClassHash, ClassInsensitiveTypes, ClassValue
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Attributes inherited from Resolv::DNS::Resource
Class Method Summary collapse
Instance Method Summary collapse
- #encode_rdata(msg) ⇒ Object
-
#initialize(data) ⇒ Generic
constructor
A new instance of Generic.
Methods inherited from Resolv::DNS::Resource
Constructor Details
#initialize(data) ⇒ Generic
Returns a new instance of Generic.
1416 1417 1418 |
# File 'lib/logmerge/resolv.rb', line 1416 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
1419 1420 1421 |
# File 'lib/logmerge/resolv.rb', line 1419 def data @data end |
Class Method Details
.create(type_value, class_value) ⇒ Object
1429 1430 1431 1432 1433 1434 1435 1436 |
# File 'lib/logmerge/resolv.rb', line 1429 def self.create(type_value, class_value) 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
1425 1426 1427 |
# File 'lib/logmerge/resolv.rb', line 1425 def self.decode_rdata(msg) return self.new(msg.get_bytes) end |
Instance Method Details
#encode_rdata(msg) ⇒ Object
1421 1422 1423 |
# File 'lib/logmerge/resolv.rb', line 1421 def encode_rdata(msg) msg.put_bytes(data) end |