Class: Resolv::DNS::Resource::Generic
- Inherits:
-
Resolv::DNS::Resource
- Object
- Query
- Resolv::DNS::Resource
- Resolv::DNS::Resource::Generic
- Defined in:
- lib/resolv.rb
Overview
A generic resource abstract class.
Constant Summary
Constant Summary
Constants inherited from Resolv::DNS::Resource
ClassHash, ClassInsensitiveTypes, ClassValue
Instance Attribute Summary (collapse)
-
- (Object) data
readonly
Data for this generic resource.
Attributes inherited from Resolv::DNS::Resource
Class Method Summary (collapse)
-
+ (Object) create(type_value, class_value)
:nodoc:.
-
+ (Object) decode_rdata(msg)
:nodoc:.
Instance Method Summary (collapse)
-
- (Object) encode_rdata(msg)
:nodoc:.
-
- (Generic) initialize(data)
constructor
Creates a new generic resource.
Methods inherited from Resolv::DNS::Resource
Constructor Details
- (Generic) initialize(data)
Creates a new generic resource.
1602 1603 1604 |
# File 'lib/resolv.rb', line 1602 def initialize(data) @data = data end |
Instance Attribute Details
- (Object) data (readonly)
Data for this generic resource.
1609 1610 1611 |
# File 'lib/resolv.rb', line 1609 def data @data end |
Class Method Details
+ (Object) create(type_value, class_value)
:nodoc:
1619 1620 1621 1622 1623 1624 1625 1626 |
# File 'lib/resolv.rb', line 1619 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 |
+ (Object) decode_rdata(msg)
:nodoc:
1615 1616 1617 |
# File 'lib/resolv.rb', line 1615 def self.decode_rdata(msg) # :nodoc: return self.new(msg.get_bytes) end |
Instance Method Details
- (Object) encode_rdata(msg)
:nodoc:
1611 1612 1613 |
# File 'lib/resolv.rb', line 1611 def encode_rdata(msg) # :nodoc: msg.put_bytes(data) end |