lib/whois/domain/ws.rb in jm81-whois-0.5.0 vs lib/whois/domain/ws.rb in jm81-whois-0.6.0
- old
+ new
@@ -1,30 +1,34 @@
-class Whois::Domain::Ws < Whois::Domain::Base
- HOST = "whois.website.ws"
- ATTR_MATCH = /\s*([^:]+):\s+(.*)$/
- responds_to :ws
-
- ATTR_NAMES = {
- :registrar_name => "Registrar Name",
- :whois_server => "Registrar Whois",
- :created_on => "Domain Created",
- :updated_on => "Domain Last Updated",
- :expires_on => "Domain Currently Expires"
- }
-
- def available?
- @raw =~ /^No match/
- end
-
- 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
-end
+class Whois::Domain::Ws < Whois::Domain::Base
+ HOST = "whois.website.ws"
+ ATTR_MATCH = /\s*([^:]+):\s+(.*)$/
+ responds_to :ws
+
+ ATTR_NAMES = {
+ :registrar_name => "Registrar Name",
+ :whois_server => "Registrar Whois",
+ :created_on => "Domain Created",
+ :updated_on => "Domain Last Updated",
+ :expires_on => "Domain Currently Expires"
+ }
+
+ def available?
+ @raw =~ /^No match/
+ end
+
+ def lookup_restricted?
+ @raw =~ /You exceeded the maximum allowable number of whois lookups/
+ end
+
+ 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
+end