Sha256: 9bdcad79279c3b44bd8ff60d2acbce64ccfb8a45a4b5133e713b49a27dfffa14
Contents?: true
Size: 1011 Bytes
Versions: 9
Compression:
Stored size: 1011 Bytes
Contents
require_relative 'base' module Whois module Scanners # Scanner for the Icann Compliant-based records. class BaseIcannCompliant < Base self.tokenizers += [ :skip_head, :scan_available, :scan_throttled, :skip_empty_line, :skip_blank_line, :scan_keyvalue, :skip_end, ] tokenizer :scan_available do if settings[:pattern_available] && @input.skip_until(settings[:pattern_available]) @ast['status:available'] = true end end tokenizer :scan_throttled do if settings[:pattern_throttled] && @input.skip_until(settings[:pattern_throttled]) @ast['response:throttled'] = true end end tokenizer :skip_head do if @input.skip_until(/Domain Name:/) @input.scan(/\s?(.+)\n/) @ast["Domain Name"] = @input[1].strip end end tokenizer :skip_end do @input.terminate end end end end
Version data entries
9 entries across 9 versions & 2 rubygems