Sha256: 239ed2b2443c3aa835cefc65fe2b9068190408b2e8c53102006b32ac29b13873
Contents?: true
Size: 1.18 KB
Versions: 6
Compression:
Stored size: 1.18 KB
Contents
#-- # Ruby Whois # # An intelligent pure Ruby WHOIS client and parser. # # Copyright (c) 2009-2015 Simone Carletti <weppos@weppos.net> #++ require_relative 'base_cocca' module Whois class Parsers # Parser for the whois.nic.as server. # # @see Whois::Parsers::Example # The Example parser for the list of all available methods. # class WhoisNicAs < Base property_supported :status do if available? :available else :registered end end property_supported :available? do !!(content_for_scanner =~ /NOT FOUND/) end property_supported :registered? do !available? end property_supported :created_on do nil # TODO end property_not_supported :updated_on property_supported :expires_on do nil # TODO end property_supported :nameservers do if content_for_scanner =~ /Name servers:\n((.+\n)+)\n/ $1.strip.split("\n").map do |line| name, ipv4, ipv6 = line.strip.split(/\s+/) Parser::Nameserver.new(name: name, ipv4: ipv4, ipv6: ipv6) end end end end end end
Version data entries
6 entries across 6 versions & 2 rubygems