aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2015-01-10 11:39:14 +0100
committerHarald Eilertsen <haraldei@anduin.net>2015-01-10 11:39:14 +0100
commit399923656e67f329105a6b91e1f2999fa4616aea (patch)
tree79adc4308d053c9a55e9979624c0692d038c6cd4 /lib
parentdd9490d438ad202b9454558bfd42112d6386720d (diff)
downloadimusician-reports-master.tar.gz
imusician-reports-master.tar.bz2
imusician-reports-master.zip
Some slight cosmetic updates.HEADmaster
Add a blank line between reports, and fix formatting of reports.
Diffstat (limited to 'lib')
-rw-r--r--lib/reports/sales_by_country.rb3
-rw-r--r--lib/reports/sales_by_date.rb1
-rw-r--r--lib/reports/sales_by_shop.rb9
3 files changed, 8 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