Sha256: 21529fc7120819c1b88b9b0fa628a56064791ad610def421977a3db95449f716

Contents?: true

Size: 865 Bytes

Versions: 4

Compression:

Stored size: 865 Bytes

Contents

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


require 'whois/record/parser/base_icb'


module Whois
  class Record
    class Parser

      # Parser for the whois.nic.io server.
      #
      # @see Whois::Record::Parser::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
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
whois-3.4.3 lib/whois/record/parser/whois.nic.io.rb
whois-3.4.2 lib/whois/record/parser/whois.nic.io.rb
whois-3.4.1 lib/whois/record/parser/whois.nic.io.rb
whois-3.4.0 lib/whois/record/parser/whois.nic.io.rb