Class: DnsChecker::Domain

Inherits:
Object
  • Object
show all
Defined in:
lib/dns_checker/domain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Domain

Returns a new instance of Domain.



12
13
14
15
# File 'lib/dns_checker/domain.rb', line 12

def initialize(name)
  @name = name
  update_nameservers
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/dns_checker/domain.rb', line 9

def name
  @name
end

#nameserversObject (readonly)

Returns the value of attribute nameservers.



10
11
12
# File 'lib/dns_checker/domain.rb', line 10

def nameservers
  @nameservers
end

Instance Method Details

#nameserver_ipsObject



17
18
19
20
21
# File 'lib/dns_checker/domain.rb', line 17

def nameserver_ips
  @nameservers.each_with_object(Set.new) do |ns, result|
    ns.a_records.each { |rec| result << rec }
  end.to_a
end