Sha256: afc4c055e771a662b197600480fc65461e3f52cc71e7be878151b82cb139a8a8
Contents?: true
Size: 1.14 KB
Versions: 3
Compression:
Stored size: 1.14 KB
Contents
#-- # Ruby Whois # # An intelligent pure Ruby WHOIS client and parser. # # Copyright (c) 2009-2015 Simone Carletti <weppos@weppos.net> #++ require 'whois/record/scanners/base' module Whois class Record module Scanners # Scanner for the whois.cnnic.cn record. class WhoisCnnicCn < Base self.tokenizers += [ :skip_empty_line, :scan_reserved, :scan_reserved_list, :scan_available, :scan_keyvalue, ] tokenizer :scan_available do if @input.match?(/^no matching record/) @ast["status:available"] = true @input.scan_until(/\n/) end end tokenizer :scan_reserved do if @input.match?(/^The domain you requested is prohibited/) @ast["status:reserved"] = true @input.scan_until(/\n/) end end tokenizer :scan_reserved_list do if @input.scan(/^Sorry, The domain you requested is in the reserved list/) @ast["status:reserved"] = true @input.scan_until(/\n/) end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
whois-3.6.5 | lib/whois/record/scanners/whois.cnnic.cn.rb |
whois-3.6.4 | lib/whois/record/scanners/whois.cnnic.cn.rb |
whois-3.6.3 | lib/whois/record/scanners/whois.cnnic.cn.rb |