Sha256: d67b2b70e2c42c7f9ce85af0dab85f412fa8ca3279e9cd03a39467a4bf1fac86
Contents?: true
Size: 1.64 KB
Versions: 1
Compression:
Stored size: 1.64 KB
Contents
# # = Ruby Whois # # An intelligent pure Ruby WHOIS client and parser. # # # Category:: Net # Package:: Whois # Author:: Simone Carletti <weppos@weppos.net> # License:: MIT License # #-- # #++ require 'whois/answer/parser/base' module Whois class Answer class Parser # # = whois.cnnic.net.cn parser # # Parser for the whois.cnnic.net.cn server. # # NOTE: This parser is just a stub and provides only a few basic methods # to check for domain availability and get domain status. # Please consider to contribute implementing missing methods. # See WhoisNicIt parser for an explanation of all available methods # and examples. # class WhoisCnnicNetCn < Base property_supported :status do @status ||= content_for_scanner.scan(/Domain Status:\s+(.*?)\n/).flatten end property_supported :available? do @available ||= (content_for_scanner.strip == "no matching record") end property_supported :registered? do !available? end property_supported :created_on do @created_on ||= if content_for_scanner =~ /Registration Date:\s+(.*)\n/ Time.parse($1) end end property_not_supported :updated_on property_supported :expires_on do @expires_on ||= if content_for_scanner =~ /Expiration Date:\s+(.*)\n/ Time.parse($1) end end property_supported :nameservers do @nameservers ||= content_for_scanner.scan(/Name Server:(.*)\n/).flatten.map(&:downcase) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
whois-1.0.9 | lib/whois/answer/parser/whois.cnnic.net.cn.rb |