Class: SiteInspector::Endpoint::Whois
- Inherits:
-
Check
- Object
- Check
- SiteInspector::Endpoint::Whois
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
Instance Method Details
#domain ⇒ Object
6
7
8
|
# File 'lib/site-inspector/checks/whois.rb', line 6
def domain
@domain ||= whois.lookup host
end
|
#ip ⇒ Object
10
11
12
|
# File 'lib/site-inspector/checks/whois.rb', line 10
def ip
@ip ||= whois.lookup ip_address
end
|
#to_h ⇒ Object
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
|