lib/whois/parsers/whois.tcinet.ru.rb in whois-parser-1.2.0 vs lib/whois/parsers/whois.tcinet.ru.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,20 +24,20 @@ # class WhoisTcinetRu < Base property_supported :domain do if content_for_scanner =~ /domain:\s+(.+?)\n/ - $1.downcase + ::Regexp.last_match(1).downcase end end property_not_supported :domain_id property_supported :status do if content_for_scanner =~ /state:\s+(.+?)\n/ - $1.split(",").map(&:strip) + ::Regexp.last_match(1).split(",").map(&:strip) else [] end end @@ -50,45 +50,45 @@ 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 property_supported :expires_on do if content_for_scanner =~ /paid-till:\s+(.*)\n/ - parse_time($1) + parse_time(::Regexp.last_match(1)) end end property_supported :registrar do if content_for_scanner =~ /registrar:\s+(.*)\n/ Parser::Registrar.new( - :id => $1 + :id => ::Regexp.last_match(1) ) end end property_supported :admin_contacts do url = content_for_scanner[/admin-contact:\s+(.+)\n/, 1] email = content_for_scanner[/e-mail:\s+(.+)\n/, 1] contact = if url or email - Parser::Contact.new( - :type => Parser::Contact::TYPE_ADMINISTRATIVE, - :url => url, - :email => email, - :name => content_for_scanner[/person:\s+(.+)\n/, 1], - :organization => content_for_scanner[/org:\s+(.+)\n/, 1], - :phone => content_for_scanner[/phone:\s+(.+)\n/, 1], - :fax => content_for_scanner[/fax-no:\s+(.+)\n/, 1] - ) - end + Parser::Contact.new( + :type => Parser::Contact::TYPE_ADMINISTRATIVE, + :url => url, + :email => email, + :name => content_for_scanner[/person:\s+(.+)\n/, 1], + :organization => content_for_scanner[/org:\s+(.+)\n/, 1], + :phone => content_for_scanner[/phone:\s+(.+)\n/, 1], + :fax => content_for_scanner[/fax-no:\s+(.+)\n/, 1] + ) + end Array.wrap(contact) end property_not_supported :registrant_contacts