Sha256: 8c93354b116db1849d69074fcf14eb3deb2c815b68954551591529eaad16cd6d

Contents?: true

Size: 320 Bytes

Versions: 1

Compression:

Stored size: 320 Bytes

Contents

class Matchd::Response::MX < Matchd::Response
  def initialize(opts)
    super
    @preference = opts.fetch("preference")
    @host = opts.fetch("host")
  end

  attr_reader :preference, :host

  def resource
    Resolv::DNS::Resource::IN::MX.new(
      preference,
      Resolv::DNS::Name.create(host),
    )
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
matchd-0.1.0 lib/matchd/response/mx.rb