Sha256: d1b3335f92a3c72406fd5d3c45535330980dd0a9d2f74d6cd263d5c0b5b18e44

Contents?: true

Size: 878 Bytes

Versions: 3

Compression:

Stored size: 878 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

3 entries across 3 versions & 1 rubygems

Version Path
whois-2.7.0 lib/whois/record/scanners/whois.ati.tn.rb
whois-2.6.4 lib/whois/record/scanners/whois.ati.tn.rb
whois-2.6.3 lib/whois/record/scanners/whois.ati.tn.rb