module Whoaz

Constants

MAIN_TLD
REGIONAL_TLD
VERSION
WHOIS_REFERER
WHOIS_URL

Public Class Methods

whois(domain='') click to toggle source

Creates a new Whois object.

@param [String] domain The domain name required to query. @return [Whoaz::Whois]

# File lib/whoaz.rb, line 17
def self.whois(domain='')
  domain = domain.to_s.strip.downcase
  raise EmptyDomain, "Domain name is not specified" if domain.empty?
  raise InvalidDomain, "Domain name contains non-ASCII characters" if domain =~ /[^\x00-\x7f]/
  Whoaz::Whois.new(domain)
end