From 4703e28e320eca90d6a22b6d8e3ea2f510806239 Mon Sep 17 00:00:00 2001 From: Miguel Nogueira Date: Mon, 20 May 2024 09:52:17 +0100 Subject: [PATCH] feat(remove): remove top monthly visits, add forgotten new line Signed-off-by: Miguel Nogueira --- main.rb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/main.rb b/main.rb index 9fff73a..8909bb9 100644 --- a/main.rb +++ b/main.rb @@ -150,18 +150,10 @@ top_client_errors.each do |ip, count| puts "#{ip}: #{count} errors" end -top_monthly_visits = monthly_visits.sort_by { |_ip, dates| -dates.values.sum }.first(5) -top_monthly_visits.each do |ip, dates| - puts "IP #{ip} had the most visits in the following months:" - dates.each do |date, count| - puts " #{date}: #{count} visits" - end -end - - monthly_visits.each do |ip, visits| puts "IP #{ip} had the following visits:" visits.each do |date, count| puts " #{date}: #{count} visits" end end +