percentage and amounts as numbers

This commit is contained in:
Gwenhael Le Moine 2014-11-06 17:19:11 +01:00
parent b6b1f30ccf
commit 39c77c4333

View file

@ -85,9 +85,9 @@ module Ledger
ary = line.split
{ currency: ary[1],
amount: ary[0],
budget: ary[2],
percentage: ary.last( 2 ).first,
amount: ary[0].to_f,
budget: ary[2].to_f,
percentage: ary.last( 2 ).first.gsub( /%/, '' ).to_f,
account: ary.last }
end
end