Sha256: 77feee12c76122288402eaf6ebd35410590917692ea401b9cd353dc0f9c3c09c

Contents?: true

Size: 903 Bytes

Versions: 9

Compression:

Stored size: 903 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_afilias'


module Whois
  class Record
    class Parser

      # Parser for the whois.nic.xxx server.
      class WhoisNicXxx < BaseAfilias

        property_supported :status do
          if reserved?
            :reserved
          else
            super()
          end
        end

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


        property_supported :updated_on do
          node("Last Updated On") do |value|
            Time.parse(value) unless value.empty?
          end
        end


        private

          def decompose_registrar(value)
            if value =~ /(.+?) \((.+?)\)/
              [$1, $2]
            end
          end

      end

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
whois-3.3.1 lib/whois/record/parser/whois.nic.xxx.rb
whois-3.3.0 lib/whois/record/parser/whois.nic.xxx.rb
whois-3.2.1 lib/whois/record/parser/whois.nic.xxx.rb
whois-3.2.0 lib/whois/record/parser/whois.nic.xxx.rb
whois-3.1.3 lib/whois/record/parser/whois.nic.xxx.rb
whois-3.1.2 lib/whois/record/parser/whois.nic.xxx.rb
whois-3.1.1 lib/whois/record/parser/whois.nic.xxx.rb
whois-3.1.0 lib/whois/record/parser/whois.nic.xxx.rb
whois-3.0.0 lib/whois/record/parser/whois.nic.xxx.rb