lib/whois/parsers/whois.nic.sn.rb in whois-parser-1.2.0 vs lib/whois/parsers/whois.nic.sn.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' @@ -22,13 +22,13 @@ property_not_supported :disclaimer property_supported :domain do if registered? and content_for_scanner =~ /Domain:\s+(.+)\n/ - $1 + ::Regexp.last_match(1) elsif available? and content_for_scanner =~ /Domain (.+?) not found/ - $1 + ::Regexp.last_match(1) end end property_not_supported :domain_id @@ -50,11 +50,11 @@ end property_supported :created_on do if content_for_scanner =~ /Created:\s+(.+)\n/ - parse_time($1) + parse_time(::Regexp.last_match(1)) end end property_not_supported :updated_on @@ -62,31 +62,31 @@ property_supported :registrar do if content_for_scanner =~ /Registrar:\s+(.+)\n/ Parser::Registrar.new( - :id => $1, - :name => $1 + :id => ::Regexp.last_match(1), + :name => ::Regexp.last_match(1) ) end end property_supported :registrant_contacts do if content_for_scanner =~ /Owner's handle:\s+(.+)\n/ - build_contact($1, Parser::Contact::TYPE_REGISTRANT) + build_contact(::Regexp.last_match(1), Parser::Contact::TYPE_REGISTRANT) end end property_supported :admin_contacts do if content_for_scanner =~ /Administrative Contact's handle:\s+(.+)\n/ - build_contact($1, Parser::Contact::TYPE_ADMINISTRATIVE) + build_contact(::Regexp.last_match(1), Parser::Contact::TYPE_ADMINISTRATIVE) end end property_supported :technical_contacts do if content_for_scanner =~ /Technical Contact's handle:\s+(.+)\n/ - build_contact($1, Parser::Contact::TYPE_TECHNICAL) + build_contact(::Regexp.last_match(1), Parser::Contact::TYPE_TECHNICAL) end end property_supported :nameservers do