Sha256: 1925e92ccb86fbf663a04c5726016f682e163a8e0823d3ed1576f212f03275fe

Contents?: true

Size: 877 Bytes

Versions: 1

Compression:

Stored size: 877 Bytes

Contents

#--
# Ruby Whois
#
# An intelligent pure Ruby WHOIS client and parser.
#
# Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
#++


require 'whois/record/scanners/base'


module Whois
  class Record
    module Scanners

      # Scanner for the whois.ati.tn record.
      #
      # @since 2.6.0
      class WhoisAtiTn < Base

        self.tokenizers += [
            :skip_empty_line,
            :scan_available,
            :scan_disclaimer,
            :scan_keyvalue,
        ]


        tokenizer :scan_available do
          if @input.skip(/^Domain (.+) not found/)
            @ast["status:available"] = true
          end
        end

        tokenizer :scan_disclaimer do
          if @input.match?(/^All rights reserved/)
            @ast["field:disclaimer"] = _scan_lines_to_array(/(.+)\n/).join("\n")
          end
        end

      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
whois-2.6.2 lib/whois/record/scanners/whois.ati.tn.rb