Sha256: f935d2ce365f964430795b1edd27268b6447b0ee6c411740007ec628062abcb2

Contents?: true

Size: 875 Bytes

Versions: 1

Compression:

Stored size: 875 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/base_cocca'


module Whois
  class Record
    class Parser

      # Parser for the whois.nic.net.nf server.
      class WhoisNicNetNf < BaseCocca

        property_supported :status do
          if content_for_scanner =~ /Status:\s+(.+?)\n/
            case $1.downcase
            when "active"         then :registered
            when "delegated"      then :registered
            when "not registered" then :available
            when /pending delete/ then :redemption
            else
              Whois.bug!(ParserError, "Unknown status `#{$1}'.")
            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.2.0 lib/whois/record/parser/whois.nic.net.nf.rb