lib/whois/parsers/kero.yachay.pe.rb in whois-parser-1.2.0 vs lib/whois/parsers/kero.yachay.pe.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'
@@ -24,22 +24,22 @@
#
class KeroYachayPe < Base
property_supported :status do
if content_for_scanner =~ /Status:\s+(.+?)\n/
- case $1.downcase
+ case ::Regexp.last_match(1).downcase
when "active"
:registered
# NEWSTATUS suspended (https://github.com/weppos/whois/issues/5)
when "suspended"
:registered
when "not registered"
:available
when "inactive"
:inactive
else
- Whois::Parser.bug!(ParserError, "Unknown status `#{$1}'.")
+ Whois::Parser.bug!(ParserError, "Unknown status `#{::Regexp.last_match(1)}'.")
end
else
Whois::Parser.bug!(ParserError, "Unable to parse status.")
end
end
@@ -60,10 +60,10 @@
property_not_supported :expires_on
property_supported :nameservers do
if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
- $1.split("\n").map do |name|
+ ::Regexp.last_match(1).split("\n").map do |name|
Parser::Nameserver.new(:name => name.strip)
end
end
end