diff options
-rw-r--r-- | lib/reports/sales_by_country.rb | 3 | ||||
-rw-r--r-- | lib/reports/sales_by_date.rb | 1 | ||||
-rw-r--r-- | lib/reports/sales_by_shop.rb | 9 | ||||
-rw-r--r-- | parse_report.rb | 1 |
4 files changed, 9 insertions, 5 deletions
diff --git a/lib/reports/sales_by_country.rb b/lib/reports/sales_by_country.rb index 97e1d07..3acffbc 100644 --- a/lib/reports/sales_by_country.rb +++ b/lib/reports/sales_by_country.rb @@ -43,7 +43,8 @@ module SalesReporter end puts "------------------------------------------" - puts "Total: #{total_streams.to_s.rjust(7)} #{total_rev.round(5).to_s.rjust(10)} EUR" + puts "Total: #{total_streams.to_s.rjust(7)} #{total_rev.round(5).to_s.rjust(10)} EUR" + puts "==========================================" end end end diff --git a/lib/reports/sales_by_date.rb b/lib/reports/sales_by_date.rb index fa651d0..989abb6 100644 --- a/lib/reports/sales_by_date.rb +++ b/lib/reports/sales_by_date.rb @@ -51,6 +51,7 @@ module SalesReporter puts "------------------------------------------" puts "Total: #{total_streams.to_s.rjust(7)} #{total_rev.round(5).to_s.rjust(10)} EUR" + puts "==========================================" end end end diff --git a/lib/reports/sales_by_shop.rb b/lib/reports/sales_by_shop.rb index 207cad8..b41dbc2 100644 --- a/lib/reports/sales_by_shop.rb +++ b/lib/reports/sales_by_shop.rb @@ -30,8 +30,8 @@ module SalesReporter def render sorted = @shops.sort { |a,b| b[1][:count] <=> a[1][:count] } - puts "Shop: Streams: Revenue:" - puts "------------------------------------------" + puts "Shop: Streams: Revenue:" + puts "---------------------------------------------------" total_rev = 0 total_streams = 0 @@ -42,8 +42,9 @@ module SalesReporter total_streams += row[:count] end - puts "------------------------------------------" - puts "Total: #{total_streams.to_s.rjust(7)} #{total_rev.round(5).to_s.rjust(10)} EUR" + puts "---------------------------------------------------" + puts "Total: #{total_streams.to_s.rjust(7)} #{total_rev.round(5).to_s.rjust(10)} EUR" + puts "===================================================" end end diff --git a/parse_report.rb b/parse_report.rb index dd3eea4..5ffb40e 100644 --- a/parse_report.rb +++ b/parse_report.rb @@ -51,4 +51,5 @@ end reports.each do |report| report.render + puts "\n" end |