Sha256: 2f8f700796542211c9cc36e97f8d144f539162511d9578e01cb20622d45c398d

Contents?: true

Size: 878 Bytes

Versions: 5

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/parser/base_cocca'


module Whois
  class Record
    class Parser

      # Parser for the whois.na-nic.com.na server.
      class WhoisNaNicComNa < 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 "suspended"      then :inactive
            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

5 entries across 5 versions & 1 rubygems

Version Path
whois-2.6.4 lib/whois/record/parser/whois.na-nic.com.na.rb
whois-2.6.3 lib/whois/record/parser/whois.na-nic.com.na.rb
whois-2.6.2 lib/whois/record/parser/whois.na-nic.com.na.rb
whois-2.6.1 lib/whois/record/parser/whois.na-nic.com.na.rb
whois-2.6.0 lib/whois/record/parser/whois.na-nic.com.na.rb