Class: Resolv::DNS::Resource::Generic
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
Resolv::DNS::Resource
|
Defined in: | lib/resolv.rb |
Overview
A generic resource abstract class.
Constant Summary
::Resolv::DNS::Resource
- Inherited
Class Method Summary
-
.new(data) ⇒ Generic
constructor
Creates a new generic resource.
- .create(type_value, class_value) Internal use only
- .decode_rdata(msg) Internal use only
::Resolv::DNS::Resource
- Inherited
::Resolv::DNS::Query
- Inherited
Instance Attribute Summary
-
#data
readonly
Data for this generic resource.
::Resolv::DNS::Resource
- Inherited
#ttl | Remaining Time To Live for this |
Instance Method Summary
- #encode_rdata(msg) Internal use only
::Resolv::DNS::Resource
- Inherited
::Resolv::DNS::Query
- Inherited
Constructor Details
.new(data) ⇒ Generic
Creates a new generic resource.
Class Method Details
.create(type_value, class_value)
This method is for internal use only.
[ GitHub ]
# File 'lib/resolv.rb', line 1769
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)
This method is for internal use only.
[ GitHub ]
# File 'lib/resolv.rb', line 1765
def self.decode_rdata(msg) # :nodoc: return self.new(msg.get_bytes) end
Instance Attribute Details
#data (readonly)
Data for this generic resource.
# File 'lib/resolv.rb', line 1759
attr_reader :data
Instance Method Details
#encode_rdata(msg)
This method is for internal use only.
[ GitHub ]
# File 'lib/resolv.rb', line 1761
def encode_rdata(msg) # :nodoc: msg.put_bytes(data) end