Class: Gem::Resolv::DNS::Resource::MX
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
Mail Exchanger resource.
Constant Summary
-
TypeValue =
Internal use only
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 237615
::Gem::Resolv::DNS::Resource
- Inherited
Class Method Summary
-
.new(preference, exchange) ⇒ MX
constructor
Creates a new
MX
record with #preference, accepting mail at #exchange. - .decode_rdata(msg) Internal use only
::Gem::Resolv::DNS::Resource
- Inherited
::Gem::Resolv::DNS::Query
- Inherited
Instance Attribute Summary
-
#exchange
readonly
The host of this
MX
. -
#preference
readonly
The preference for this
MX
.
::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(preference, exchange) ⇒ MX
Creates a new MX
record with #preference, accepting mail at #exchange.
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2382
def initialize(preference, exchange) @preference = preference @exchange = exchange end
Class Method Details
.decode_rdata(msg)
This method is for internal use only.
[ GitHub ]
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2402
def self.decode_rdata(msg) # :nodoc: preference, = msg.get_unpack('n') exchange = msg.get_name return self.new(preference, exchange) end
Instance Attribute Details
#exchange (readonly)
The host of this MX
.
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2395
attr_reader :exchange
#preference (readonly)
The preference for this MX
.
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2390
attr_reader :preference
Instance Method Details
#encode_rdata(msg)
This method is for internal use only.
[ GitHub ]
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2397
def encode_rdata(msg) # :nodoc: msg.put_pack('n', @preference) msg.put_name(@exchange) end