Sha256: e7f283b20683d0a8ba1aa04d10826bbcb846c379ff69347ab1a27e6e9349d7ba
Contents?: true
Size: 1.34 KB
Versions: 15
Compression:
Stored size: 1.34 KB
Contents
#-- # Ruby Whois # # An intelligent pure Ruby WHOIS client and parser. # # Copyright (c) 2009-2014 Simone Carletti <weppos@weppos.net> #++ require 'whois/record/scanners/base' module Whois class Record module Scanners # Scanner for the whois.domainregistry.ie server. class WhoisDomainregistryIe < Base self.tokenizers += [ :skip_empty_line, :scan_disclaimer, :scan_contact, :scan_keyvalue, :scan_available, :skip_application_pending, ] tokenizer :scan_available do if @input.skip(/^% Not Registered - .+\n/) @ast["status:available"] = true end end tokenizer :scan_disclaimer do if @input.match?(/^% Rights restricted by copyright/) @ast["field:disclaimer"] = _scan_lines_to_array(/^%(.+)\n/).join("\n") end end tokenizer :scan_contact do if @input.match?(/^person:/) lines = _scan_lines_to_hash(/(.+?):(.*?)\n/) @ast["field:#{lines['nic-hdl']}"] = lines end end tokenizer :skip_application_pending do if @input.match?(/^% Application Pending/) _scan_lines_to_array(/^%(.+)\n/) @ast["status:pending"] = true end end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems