Sha256: 5919ec91c0c7b7d8f1c59dfb2ab194f5b0ace1528fab3dd6315c02ad07b555b0

Contents?: true

Size: 773 Bytes

Versions: 1

Compression:

Stored size: 773 Bytes

Contents

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


require_relative 'base_icb'


module Whois
  class Parsers

    # Parser for the whois.nic.io server.
    #
    # @see Whois::Parsers::Example
    #   The Example parser for the list of all available methods.
    #
    class WhoisNicIo < BaseIcb

      property_supported :domain do
        if reserved?
          nil
        else
          super()
        end
      end

      property_supported :status do
        if reserved?
          :reserved
        else
          super()
        end
      end


      # NEWPROPERTY
      def reserved?
        !!content_for_scanner.match(/^Domain reserved\n/)
      end

    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
whois-parser-1.1.0 lib/whois/parsers/whois.nic.io.rb