Sha256: c5ba1235dcbd8f2adae9747a545b4ce27336d2c892cbda1835045f41bcf4af46

Contents?: true

Size: 792 Bytes

Versions: 2

Compression:

Stored size: 792 Bytes

Contents

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


require 'whois/record/parser/scanners/base'


module Whois
  class Record
    class Parser
      module Scanners

        class WhoisTldEe < Scanners::Base

          def parse_content
            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
            # FIXME: incomplete scanner, it skips all the properties
            else
              @input.scan(/(.*)\n/)
            end
          end

        end

      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
whois-2.2.0 lib/whois/record/parser/scanners/whois.tld.ee.rb
whois-2.1.0 lib/whois/record/parser/scanners/whois.tld.ee.rb