From 057bed03018c3235fbcd3c21abd86f02f65f96c1 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Fri, 14 Nov 2014 16:14:03 +0100 Subject: Reports pick up their data from the row rather than the sale object. --- lib/sale.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/sale.rb') diff --git a/lib/sale.rb b/lib/sale.rb index 17c6f18..f02a471 100644 --- a/lib/sale.rb +++ b/lib/sale.rb @@ -1,14 +1,12 @@ module SalesReporter class Sale - attr_reader :date, :amount, :quantity, :country, :shop + attr_reader :date, :amount, :quantity - def initialize(date_, amount, quantity, country, shop) + def initialize(date_, amount, quantity) @date = sanitize_date(date_) raise TypeError('sanitize failed') unless @date.is_a? Date @amount = amount @quantity = quantity - @country = country - @shop = shop end private -- cgit v1.2.3