Class: Gem::Resolv::DNS::Resource::Generic
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
Gem::Resolv::DNS::Resource
|
Defined in: | lib/rubygems/vendor/resolv/lib/resolv.rb |
Overview
A generic resource abstract class.
Constant Summary
::Gem::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
::Gem::Resolv::DNS::Resource
- Inherited
::Gem::Resolv::DNS::Query
- Inherited
Instance Attribute Summary
-
#data
readonly
Data for this generic resource.
::Gem::Resolv::DNS::Resource
- Inherited
#ttl | Remaining Time To Live for this |
Instance Method Summary
- #encode_rdata(msg) Internal use only
::Gem::Resolv::DNS::Resource
- Inherited
::Gem::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/rubygems/vendor/resolv/lib/resolv.rb', line 2177
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/rubygems/vendor/resolv/lib/resolv.rb', line 2173
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/rubygems/vendor/resolv/lib/resolv.rb', line 2167
attr_reader :data
Instance Method Details
#encode_rdata(msg)
This method is for internal use only.
[ GitHub ]
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2169
def encode_rdata(msg) # :nodoc: msg.put_bytes(data) end