Sha256: 2e96f1ebf453446b910f74493c4e207304dd8711c085b711015ad930d5d930f3
Contents?: true
Size: 886 Bytes
Versions: 16
Compression:
Stored size: 886 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 Afilias < Base def request(qstring) response = ask_the_socket(qstring, "whois.afilias-grs.info", DEFAULT_WHOIS_PORT) append_to_buffer response, "whois.afilias-grs.info" 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:/ && response =~ /Whois Server:(\S+)/ $1 end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems