Class: Resolv::DNS::Resource::MX
- Inherits:
-
Resolv::DNS::Resource
- Object
- Query
- Resolv::DNS::Resource
- Resolv::DNS::Resource::MX
- Defined in:
- lib/logmerge/resolv.rb
Constant Summary collapse
- TypeValue =
15
Constants inherited from Resolv::DNS::Resource
ClassHash, ClassInsensitiveTypes, ClassValue
Instance Attribute Summary collapse
-
#exchange ⇒ Object
readonly
Returns the value of attribute exchange.
-
#preference ⇒ Object
readonly
Returns the value of attribute preference.
Attributes inherited from Resolv::DNS::Resource
Class Method Summary collapse
Instance Method Summary collapse
- #encode_rdata(msg) ⇒ Object
-
#initialize(preference, exchange) ⇒ MX
constructor
A new instance of MX.
Methods inherited from Resolv::DNS::Resource
Constructor Details
#initialize(preference, exchange) ⇒ MX
Returns a new instance of MX.
1543 1544 1545 1546 |
# File 'lib/logmerge/resolv.rb', line 1543 def initialize(preference, exchange) @preference = preference @exchange = exchange end |
Instance Attribute Details
#exchange ⇒ Object (readonly)
Returns the value of attribute exchange.
1547 1548 1549 |
# File 'lib/logmerge/resolv.rb', line 1547 def exchange @exchange end |
#preference ⇒ Object (readonly)
Returns the value of attribute preference.
1547 1548 1549 |
# File 'lib/logmerge/resolv.rb', line 1547 def preference @preference end |
Class Method Details
.decode_rdata(msg) ⇒ Object
1554 1555 1556 1557 1558 |
# File 'lib/logmerge/resolv.rb', line 1554 def self.decode_rdata(msg) preference, = msg.get_unpack('n') exchange = msg.get_name return self.new(preference, exchange) end |
Instance Method Details
#encode_rdata(msg) ⇒ Object
1549 1550 1551 1552 |
# File 'lib/logmerge/resolv.rb', line 1549 def encode_rdata(msg) msg.put_pack('n', @preference) msg.put_name(@exchange) end |