Sha256: b00b369a810fb44f5eb8367f411081b275caf5be8d1dda7dc3e0998284b0da3c

Contents?: true

Size: 1.64 KB

Versions: 7

Compression:

Stored size: 1.64 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

        property_not_supported :admin

        property_not_supported :technical


        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

7 entries across 7 versions & 1 rubygems

Version Path
whois-1.0.12 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.0.11 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.0.10 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.0.9 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.0.8 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.0.7 lib/whois/answer/parser/whois.nic.ac.rb
whois-1.0.6 lib/whois/answer/parser/whois.nic.ac.rb