Class: Net::DNS::RR::MX
- Inherits:
-
Net::DNS::RR
- Object
- Net::DNS::RR
- Net::DNS::RR::MX
- Defined in:
- lib/net/dns/rr/mx.rb
Overview
Mail Exchange Record (MX)
Class for DNS MX resource records.
A MX record specifies the name and relative preference of mail servers (mail exchangers in the DNS jargon) for the zone. The MX RR is used by SMTP (Mail) Agents to route mail for the domain.
Constant Summary
Constants inherited from Net::DNS::RR
Constants included from Names
Instance Attribute Summary collapse
-
#exchange ⇒ Object
readonly
Gets the exchange value.
-
#preference ⇒ Object
readonly
Gets the preference value.
Attributes inherited from Net::DNS::RR
Instance Method Summary collapse
-
#value ⇒ Object
Gets the standardized value for this record, represented by the value of
preference
andexchange
.
Methods inherited from Net::DNS::RR
#cls, #comp_data, #data, #initialize, #inspect, parse, parse_packet, #to_a, #to_s, #type
Methods included from Names
#dn_comp, #dn_expand, #names_array, #pack_name, #valid?
Constructor Details
This class inherits a constructor from Net::DNS::RR
Instance Attribute Details
#exchange ⇒ Object (readonly)
Gets the exchange value.
Returns a String.
22 23 24 |
# File 'lib/net/dns/rr/mx.rb', line 22 def exchange @exchange end |
#preference ⇒ Object (readonly)
Gets the preference value.
Returns an Integer.
17 18 19 |
# File 'lib/net/dns/rr/mx.rb', line 17 def preference @preference end |
Instance Method Details
#value ⇒ Object
Gets the standardized value for this record, represented by the value of preference
and exchange
.
Returns a String.
28 29 30 |
# File 'lib/net/dns/rr/mx.rb', line 28 def value "#{preference} #{exchange}" end |