Sha256: 5106a8252040930f88aa9e39af9a4ae488620c955d8fe2e10568e16c1adc81b7
Contents?: true
Size: 892 Bytes
Versions: 8
Compression:
Stored size: 892 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
8 entries across 8 versions & 1 rubygems