Sha256: 29ad97cd2abc03a5825391d2acc3c9436db1a61824e68a5fb29f9b9d175b897b

Contents?: true

Size: 1.75 KB

Versions: 7

Compression:

Stored size: 1.75 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 ||= if content_for_scanner =~ /Domain "(.+?)"/
            $1.downcase
          end
        end

        property_not_supported :domain_id


        property_not_supported :referral_whois

        property_not_supported :referral_url


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

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

        property_supported :registered? do
          @registered ||= !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


        property_not_supported :nameservers


        # NEWPROPERTY
        def changed?(other)
          !unchanged?(other)
        end

        # NEWPROPERTY
        def unchanged?(other)
          self.equal?(other) ||
          self.content_for_scanner == other.content_for_scanner
        end

      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
whois-1.6.6 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.6.5 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.6.4 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.6.3 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.6.2 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.6.1 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.6.0 lib/whois/answer/parser/whois.nic.ac.rb