Sha256: 7d7964c4b4e16e07a608f3abe2449fb829508e73d4506fbf7feb9c40e9665738
Contents?: true
Size: 989 Bytes
Versions: 13
Compression:
Stored size: 989 Bytes
Contents
# # = Ruby Whois # # An intelligent pure Ruby WHOIS client and parser. # # # Category:: Net # Package:: Whois # Author:: Simone Carletti <weppos@weppos.net> # License:: MIT License # #-- # #++ module Whois class Server module Adapters class Verisign < Base def request(qstring) response = ask_the_socket("=#{qstring}", host, DEFAULT_WHOIS_PORT) append_to_buffer response, host if endpoint = extract_referral(response) response = ask_the_socket(qstring, endpoint, DEFAULT_WHOIS_PORT) append_to_buffer response, endpoint end end private def extract_referral(response) if response =~ /Domain Name:/ endpoint = response.scan(/Whois Server: (.+?)$/).flatten.last endpoint.strip! endpoint = nil if endpoint == "not defined" endpoint end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems