Class: SiteInspector::Endpoint::Whois

Inherits:
Check
  • Object
show all
Defined in:
lib/site-inspector/checks/whois.rb

Instance Attribute Summary

Attributes inherited from Check

#endpoint

Instance Method Summary collapse

Methods inherited from Check

enabled=, enabled?, #host, #initialize, #inspect, #name, name, #request, #response

Constructor Details

This class inherits a constructor from SiteInspector::Endpoint::Check

Instance Method Details

#domainObject



6
7
8
# File 'lib/site-inspector/checks/whois.rb', line 6

def domain
  @domain ||= whois.lookup host
end

#ipObject



10
11
12
# File 'lib/site-inspector/checks/whois.rb', line 10

def ip
  @ip ||= whois.lookup ip_address
end

#to_hObject



14
15
16
17
18
19
# File 'lib/site-inspector/checks/whois.rb', line 14

def to_h
  {
    domain: record_to_h(domain),
    ip: record_to_h(ip)
  }
end