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 ary = line.split
{ currency: ary[1], { currency: ary[1],
amount: ary[0], amount: ary[0].to_f,
budget: ary[2], budget: ary[2].to_f,
percentage: ary.last( 2 ).first, percentage: ary.last( 2 ).first.gsub( /%/, '' ).to_f,
account: ary.last } account: ary.last }
end end
end end