Sha256: d3889bafdecd3566ab7b4d34fd293f895a15c52bfe665917a68fd47c8d569da6

Contents?: true

Size: 1.88 KB

Versions: 22

Compression:

Stored size: 1.88 KB

Contents

#
# = Ruby Whois
#
# An intelligent pure Ruby WHOIS client and parser.
#
#
# Category::    Net
# Package::     Whois
# Author::      Simone Carletti <weppos@weppos.net>
# License::     MIT License
#
#--
#
#++


require 'whois/answer/parser/base'


module Whois
  class Answer
    class Parser

      #
      # = whois.nic.ac parser
      #
      # Parser for the whois.nic.ac server.
      #
      class WhoisNicAc < Base

        property_not_supported :disclaimer

        property_supported :domain do
          @domain ||= Proc.new do
            content_for_scanner =~ /Domain "(.*?)"/
            $1.downcase
          end.call
        end

        property_not_supported :domain_id


        property_supported :status do
          @status ||= if available?
            :available
          else
            :registered
          end
        end

        property_supported :available? do
          @available ||= !(content_for_scanner =~ /Not available/)
        end

        property_supported :registered? do
          !available?
        end


        property_not_supported :created_on

        property_not_supported :updated_on

        property_not_supported :expires_on


        property_not_supported :registrar

        property_not_supported :registrant_contact

        property_not_supported :admin_contact

        property_not_supported :technical_contact

        # @deprecated
        register_property :registrant, :not_supported
        # @deprecated
        register_property :admin, :not_supported
        # @deprecated
        register_property :technical, :not_supported


        property_not_supported :nameservers


        property_supported :changed? do |other|
          !unchanged?(other)
        end

        property_supported :unchanged? do |other|
          self == other ||
          self.content_for_scanner == other.content_for_scanner
        end

      end

    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
whois-1.3.10 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.3.9 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.3.8 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.3.7 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.3.6 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.3.5 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.3.4 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.3.3 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.3.2 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.3.1 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.3.0 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.2.2 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.2.1 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.2.0 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.1.8 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.1.7 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.1.6 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.1.5 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.1.4 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.1.3 lib/whois/answer/parser/whois.nic.ac.rb