diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2015-01-10 11:39:14 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2015-01-10 11:39:14 +0100 |
commit | 399923656e67f329105a6b91e1f2999fa4616aea (patch) | |
tree | 79adc4308d053c9a55e9979624c0692d038c6cd4 | |
parent | dd9490d438ad202b9454558bfd42112d6386720d (diff) | |
download | imusician-reports-399923656e67f329105a6b91e1f2999fa4616aea.tar.gz imusician-reports-399923656e67f329105a6b91e1f2999fa4616aea.tar.bz2 imusician-reports-399923656e67f329105a6b91e1f2999fa4616aea.zip |
Add a blank line between reports, and fix formatting of reports.
-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 |