Sha256: 472d4e8ce06f8cf446ab02389d5beea6c2325542a1e0f11a7fc2c9fbb05d8795

Contents?: true

Size: 1.01 KB

Versions: 6

Compression:

Stored size: 1.01 KB

Contents

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


require_relative 'base_afilias'


module Whois
  class Parsers

    # Parser for the whois.aero server.
    #
    # @see Whois::Parsers::Example
    #   The Example parser for the list of all available methods.
    #
    class WhoisAero < BaseAfilias

      self.scanner = Scanners::BaseAfilias, {
        pattern_reserved: /^Name is restricted from registration\n/,
      }


      property_supported :status do
        if reserved?
          :reserved
        else
          Array.wrap(node("Domain Status"))
        end
      end


      property_supported :updated_on do
        node("Updated On") do |value|
          parse_time(value)
        end
      end

      property_supported :expires_on do
        node("Expires On") do |value|
          parse_time(value)
        end
      end


      # NEWPROPERTY
      def reserved?
        !!node("status:reserved")
      end

    end

  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
whois-parser-1.0.1 lib/whois/parsers/whois.aero.rb
hetzner-whois-parser-1.0.1.rc2 lib/whois/parsers/whois.aero.rb
hetzner-whois-parser-1.0.1.rc1 lib/whois/parsers/whois.aero.rb
whois-parser-1.0.0 lib/whois/parsers/whois.aero.rb
whois-parser-1.0.0.pre.beta2 lib/whois/parsers/whois.aero.rb
whois-parser-1.0.0.pre.beta1 lib/whois/parsers/whois.aero.rb