Class: Whois::Domain::Ws
- Inherits:
-
Base
- Object
- Base
- Whois::Domain::Ws
show all
- Defined in:
- lib/whois/domain/ws.rb
Constant Summary
collapse
- HOST =
"whois.website.ws"
- ATTR_MATCH =
/\s*([^:]+):\s+(.*)$/
- ATTR_NAMES =
{
:registrar_name => "Registrar Name",
:whois_server => "Registrar Whois",
:created_on => "Domain Created",
:updated_on => "Domain Last Updated",
:expires_on => "Domain Currently Expires"
}
Instance Attribute Summary
Attributes inherited from Base
#name, #raw
Instance Method Summary
collapse
Methods inherited from Base
#administrative_id, #attrs, #created_on, #database_updated_at, #expired?, #expires_on, #host, #initialize, #ns, #register_url, #registered?, #registrant_id, #registrar_name, responds_to, #status, #to_s, #updated_on, #whois_server
Instance Method Details
#available? ⇒ Boolean
14
15
16
|
# File 'lib/whois/domain/ws.rb', line 14
def available?
@raw =~ /^No match/
end
|
#lookup_restricted? ⇒ Boolean
18
19
20
|
# File 'lib/whois/domain/ws.rb', line 18
def lookup_restricted?
@raw =~ /You exceeded the maximum allowable number of whois lookups/
end
|
#name_servers ⇒ Object
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/whois/domain/ws.rb', line 22
def name_servers
found = false
ns_ary = []
@raw.each_line do |l|
if l =~ /Current Nameservers:/
found = true
elsif found && l =~ /^\s*(\S+)/
ns_ary << $1
end
end
ns_ary
end
|