lib/differential/calculator/item.rb in differential-1.0.2 vs lib/differential/calculator/item.rb in differential-1.0.3

- old
+ new

@@ -14,17 +14,19 @@ # in Group objects.) class Item include ::Differential::Calculator::HasTotals include ::Differential::Calculator::Side - attr_reader :id, :a_records, :b_records + attr_reader :a_records, + :b_records, + :id def initialize(id) raise ArgumentError, 'id is required' unless id - @id = id @a_records = [] @b_records = [] + @id = id end def add(record, side) raise ArgumentError, 'record is required' unless record raise ArgumentError, 'side is required' unless side