Sha256: b567c07ebb71251614d87ab52e67f84af567ad94015ac8053aff9d0fb765ae31

Contents?: true

Size: 896 Bytes

Versions: 1

Compression:

Stored size: 896 Bytes

Contents

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


require 'whois/record/parser/base_cocca'


module Whois
  class Record
    class Parser

      # Parser for the whois.nic.gs server.
      class WhoisNicGs < BaseCocca

        property_supported :status do
          if content_for_scanner =~ /Status:\s+(.+?)\n/
            case (s = $1.downcase)
            when "active"
              :registered
            when "delegated"
              :registered
            when "not registered"
              :available
            when /pending delete/
              :redemption
            else
              Whois.bug!(ParserError, "Unknown status `#{s}'.")
            end
          else
            Whois.bug!(ParserError, "Unable to parse status.")
          end
        end

      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
whois-2.7.0 lib/whois/record/parser/whois.nic.gs.rb