lib/whois/parsers/whois.nic.lk.rb in whois-parser-1.2.0 vs lib/whois/parsers/whois.nic.lk.rb in whois-parser-2.0.0
- old
+ new
@@ -1,11 +1,11 @@
#--
# Ruby Whois
#
# An intelligent pure Ruby WHOIS client and parser.
#
-# Copyright (c) 2009-2018 Simone Carletti <weppos@weppos.net>
+# Copyright (c) 2009-2022 Simone Carletti <weppos@weppos.net>
#++
require_relative 'base'
@@ -23,11 +23,11 @@
property_not_supported :disclaimer
property_supported :domain do
if content_for_scanner =~ /Domain Name:\n\s+(.+)\n/
- $1
+ ::Regexp.last_match(1)
end
end
property_not_supported :domain_id
@@ -49,23 +49,23 @@
end
property_supported :created_on do
if content_for_scanner =~ /Created on\.+:(.+)\n/
- parse_time($1)
+ parse_time(::Regexp.last_match(1))
end
end
property_supported :updated_on do
if content_for_scanner =~ /Record last updated on\.+:(.+)\n/
- parse_time($1)
+ parse_time(::Regexp.last_match(1))
end
end
property_supported :expires_on do
if content_for_scanner =~ /Expires on\.+:(.+)\n/
- parse_time($1)
+ parse_time(::Regexp.last_match(1))
end
end
property_not_supported :registrar
@@ -74,11 +74,11 @@
property_supported :registrant_contacts do
if content_for_scanner =~ /Registrant:\n\s+(.+)\n/
Parser::Contact.new(
:type => Parser::Contact::TYPE_REGISTRANT,
:id => nil,
- :name => $1,
+ :name => ::Regexp.last_match(1),
:organization => nil,
:address => nil,
:city => nil,
:zip => nil,
:state => nil,
@@ -95,10 +95,10 @@
property_not_supported :technical_contacts
property_supported :nameservers do
if content_for_scanner =~ /Domain Servers in listed order:\n((?:.+\n)+)/
- $1.split("\n").map do |name|
+ ::Regexp.last_match(1).split("\n").map do |name|
Parser::Nameserver.new(:name => name.strip.chomp("."))
end
end
end