Class: Resolv::DNS::Resource::MX
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
Resolv::DNS::Resource
|
Defined in: | lib/resolv.rb |
Overview
Mail Exchanger resource.
Constant Summary
-
TypeValue =
Internal use only
# File 'lib/resolv.rb', line 198715
::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
::Resolv::DNS::Resource - Inherited
::Resolv::DNS::Query - Inherited
Instance Attribute Summary
-
#exchange
readonly
The host of this
MX
. -
#preference
readonly
The preference for this
MX
.
::Resolv::DNS::Resource - Inherited
#ttl | Remaining Time To Live for this ::Resolv::DNS::Resource. |
Instance Method Summary
- #encode_rdata(msg) Internal use only
::Resolv::DNS::Resource - Inherited
::Resolv::DNS::Query - Inherited
Constructor Details
.new(preference, exchange) ⇒ MX
Creates a new MX
record with #preference, accepting mail at #exchange.
# File 'lib/resolv.rb', line 1993
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/resolv.rb', line 2013
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/resolv.rb', line 2006
attr_reader :exchange
#preference (readonly)
The preference for this MX
.
# File 'lib/resolv.rb', line 2001
attr_reader :preference
Instance Method Details
#encode_rdata(msg)
This method is for internal use only.
[ GitHub ]
# File 'lib/resolv.rb', line 2008
def encode_rdata(msg) # :nodoc: msg.put_pack('n', @preference) msg.put_name(@exchange) end