Sha256: 26c39cff5d65975dae7300f58d7e501201a11fc0d8139edf9e6cfd9955a28a9a
Contents?: true
Size: 1.06 KB
Versions: 7
Compression:
Stored size: 1.06 KB
Contents
#-- # Ruby Whois # # An intelligent pure Ruby WHOIS client and parser. # # Copyright (c) 2009-2013 Simone Carletti <weppos@weppos.net> #++ require 'whois/record/scanners/base' module Whois class Record module Scanners class BaseCocca2 < Base self.tokenizers += [ :skip_empty_line, :scan_disclaimer, :skip_lastupdate, :skip_token_additionalsection, :scan_keyvalue, ] DISCLAIMER_MATCHES = [ "TERMS OF USE:", # global "Terminos de Uso:", # whois.nic.hn "The data in the WHOIS database of Meridian", # whois.meridiantld.net ] tokenizer :scan_disclaimer do if @input.match?(/^#{DISCLAIMER_MATCHES.join("|")}/) @ast["field:disclaimer"] = @input.scan_until(/>>>/) end end tokenizer :skip_lastupdate do @input.skip(/>>>(.+?)<<<\n/) end tokenizer :skip_token_additionalsection do @input.skip(/Additional Section\n/) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems