Sha256: e29d6590af5164e30b22d6c72f5b291ca655eb77a2ab46e0bb092c8fa64d49a6
Contents?: true
Size: 1010 Bytes
Versions: 8
Compression:
Stored size: 1010 Bytes
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.fi record. class WhoisFi < Base self.tokenizers += [ :skip_empty_line, :scan_available, :scan_disclaimer, :scan_keyvalue, :scan_reserved ] tokenizer :scan_available do if @input.skip(/^Domain not found/) @ast["status:available"] = true end end tokenizer :scan_reserved do if @input.skip(/^Domain not available/) @ast["status:reserved"] = true end end tokenizer :scan_disclaimer do if @input.match?(/^More information/) @ast["field:disclaimer"] = @input.scan_until(/(.*)\n\n/).strip end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems