Sha256: 63a413e91003b479232a8bfd46abd6873245b1e24015fbd2d190c66f709c0ec8

Contents?: true

Size: 941 Bytes

Versions: 6

Compression:

Stored size: 941 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.tld.ee record.
      #
      # @todo This is an incomplete scanner, it skips all the properties
      #       except contacts.
      class WhoisTldEe < Base

        self.tokenizers += [
            :scan_contact,
            :todo_content,
        ]


        tokenizer :scan_contact do
          if @input.scan(/contact:\s+(.*)\n/)
            section = @input[1].strip
            content = {}

            while @input.scan(/(.*?):\s+(.*?)\n/)
              content[@input[1]] = @input[2]
            end

            @ast[section] = content
          end
        end

        tokenizer :todo_content do
          @input.scan(/(.*)\n/)
        end

      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
whois-2.6.3 lib/whois/record/scanners/whois.tld.ee.rb
whois-2.6.2 lib/whois/record/scanners/whois.tld.ee.rb
whois-2.6.1 lib/whois/record/scanners/whois.tld.ee.rb
whois-2.6.0 lib/whois/record/scanners/whois.tld.ee.rb
whois-2.5.1 lib/whois/record/scanners/whois.tld.ee.rb
whois-2.5.0 lib/whois/record/scanners/whois.tld.ee.rb