From a47e85878e6947cfdfcb4a4ef612e0655e46672a Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Mon, 14 Jul 2014 16:18:22 +0200 Subject: [PATCH] -f implicit --- lib/ledger.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ledger.rb b/lib/ledger.rb index 1ac20b55..12815f4f 100644 --- a/lib/ledger.rb +++ b/lib/ledger.rb @@ -7,7 +7,7 @@ module Ledger @file = '~/org/comptes.ledger' def run( options, command = '', command_parameters = '' ) - `#{@binary} #{options} #{command} #{command_parameters}` + `#{@binary} -f #{@file} #{options} #{command} #{command_parameters}` end def version @@ -23,11 +23,11 @@ module Ledger end def cleared - run "-f #{@file}", 'cleared' + run '', 'cleared' end def monthly_register( category ) - run( "-f #{@file} --monthly --collapse --amount-data --exchange '€'", 'register', "#{category}" ) + run( "--monthly --collapse --amount-data --exchange '€'", 'register', "#{category}" ) .split( "\n" ) .map { |line| @@ -40,6 +40,6 @@ module Ledger def balance( period = nil ) period = period.nil? ? '' : "-p #{period}" - output run "-f #{@file} --flat --exchange '€' #{period}", 'balance', "#{category}" + output run "--flat --exchange '€' #{period}", 'balance', "#{category}" end end