class Matchd::Response::PTR

Attributes

host[R]

Public Class Methods

new(opts) click to toggle source
Calls superclass method Matchd::Response::new
# File lib/matchd/response/ptr.rb, line 2
def initialize(opts)
  super
  @host = opts.is_a?(Hash) ? opts.fetch("host") : opts
end

Public Instance Methods

resource() click to toggle source
# File lib/matchd/response/ptr.rb, line 9
def resource
  Resolv::DNS::Resource::IN::PTR.new(Resolv::DNS::Name.create(host))
end