-f implicit
This commit is contained in:
parent
2cfd14ab63
commit
a47e85878e
1 changed files with 4 additions and 4 deletions
|
@ -7,7 +7,7 @@ module Ledger
|
||||||
@file = '~/org/comptes.ledger'
|
@file = '~/org/comptes.ledger'
|
||||||
|
|
||||||
def run( options, command = '', command_parameters = '' )
|
def run( options, command = '', command_parameters = '' )
|
||||||
`#{@binary} #{options} #{command} #{command_parameters}`
|
`#{@binary} -f #{@file} #{options} #{command} #{command_parameters}`
|
||||||
end
|
end
|
||||||
|
|
||||||
def version
|
def version
|
||||||
|
@ -23,11 +23,11 @@ module Ledger
|
||||||
end
|
end
|
||||||
|
|
||||||
def cleared
|
def cleared
|
||||||
run "-f #{@file}", 'cleared'
|
run '', 'cleared'
|
||||||
end
|
end
|
||||||
|
|
||||||
def monthly_register( category )
|
def monthly_register( category )
|
||||||
run( "-f #{@file} --monthly --collapse --amount-data --exchange '€'", 'register', "#{category}" )
|
run( "--monthly --collapse --amount-data --exchange '€'", 'register', "#{category}" )
|
||||||
.split( "\n" )
|
.split( "\n" )
|
||||||
.map {
|
.map {
|
||||||
|line|
|
|line|
|
||||||
|
@ -40,6 +40,6 @@ module Ledger
|
||||||
|
|
||||||
def balance( period = nil )
|
def balance( period = nil )
|
||||||
period = period.nil? ? '' : "-p #{period}"
|
period = period.nil? ? '' : "-p #{period}"
|
||||||
output run "-f #{@file} --flat --exchange '€' #{period}", 'balance', "#{category}"
|
output run "--flat --exchange '€' #{period}", 'balance', "#{category}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue