default values for budget

This commit is contained in:
Gwenhael Le Moine 2015-01-20 16:12:30 +01:00
parent 2f33a0b432
commit 4a9c4f5f08

View file

@ -75,7 +75,7 @@ module Ledger
end end
end end
def budget( period, categories ) def budget( period = nil, categories = '' )
period = period.nil? ? '' : "-p '#{period}'" period = period.nil? ? '' : "-p '#{period}'"
budgeted = run( "--flat --no-total --budget --exchange '#{CURRENCY}' #{period}", 'budget', categories ) budgeted = run( "--flat --no-total --budget --exchange '#{CURRENCY}' #{period}", 'budget', categories )