Class Resolv::DNS::Resource::MX
In: resolv.rb
Parent: Resource

Methods

Constants

TypeValue = 15

Attributes

exchange  [R] 
preference  [R] 

Public Class methods

[Source]

# File resolv.rb, line 1546
        def self.decode_rdata(msg)
          preference, = msg.get_unpack('n')
          exchange = msg.get_name
          return self.new(preference, exchange)
        end

[Source]

# File resolv.rb, line 1535
        def initialize(preference, exchange)
          @preference = preference
          @exchange = exchange
        end

Public Instance methods

[Source]

# File resolv.rb, line 1541
        def encode_rdata(msg)
          msg.put_pack('n', @preference)
          msg.put_name(@exchange)
        end

[Validate]

ruby-doc.org is a service of James Britt and Happy Camper Studios, a Ruby application development company in Phoenix, AZ.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.