Class: DnsChecker::Domain
- Inherits:
-
Object
- Object
- DnsChecker::Domain
- Defined in:
- lib/dns_checker/domain.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#nameservers ⇒ Object
readonly
Returns the value of attribute nameservers.
Instance Method Summary collapse
-
#initialize(name) ⇒ Domain
constructor
A new instance of Domain.
- #nameserver_ips ⇒ Object
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/dns_checker/domain.rb', line 9 def name @name end |
#nameservers ⇒ Object (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_ips ⇒ Object
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 |