Class: NameChecker::WhoisChecker

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/name_checker/whois_checker.rb

Class Method Summary collapse

Methods included from Logging

infer_level, logger, #logger

Class Method Details

.check(host, options = {}) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/name_checker/whois_checker.rb', line 6

def self.check(host, options = {})
  # INFO: http://bit.ly/KYpzaj
  res = Whois.available?(host)
  Availability.new(@service_name, res)
rescue Timeout::Error, Whois::Error
  Availability.new(@service_name, 'unknown')
end