Sha256: 22bf39461442a6fe6e18e74e9d9eb3dff96925fcf845be3d101106ff2e0cc6c5
Contents?: true
Size: 782 Bytes
Versions: 9
Compression:
Stored size: 782 Bytes
Contents
require_relative 'base' module Whois module Scanners class WhoisSx < Base self.tokenizers += [ :skip_blank_line, :scan_available, :scan_keyvalue, :skip_lastupdate, :scan_disclaimer, ] tokenizer :scan_available do if @input.scan(/^Status: (.+) \(No match for domain "(.+)"\)\n/) @ast["Domain Status"] = @input[1] @ast["Domain Name"] = @input[2] end end tokenizer :skip_lastupdate do @input.skip(/>>>(.+?)<<<\n/) end tokenizer :scan_disclaimer do if @input.match?(/^% WHOIS LEGAL STATEMENT/) @ast["field:disclaimer"] = _scan_lines_to_array(/%(.*)\n/).map(&:strip).join("\n") end end end end end
Version data entries
9 entries across 9 versions & 2 rubygems