From 90bb3c55d14f1dd669c511bde376f1f7bd33f2ec Mon Sep 17 00:00:00 2001 From: Mike Auclair Date: Wed, 19 Oct 2011 15:21:20 -0400 Subject: [PATCH] cleanup --- lib/active_pdftk/call.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/active_pdftk/call.rb b/lib/active_pdftk/call.rb index 1aa17f2..da91435 100644 --- a/lib/active_pdftk/call.rb +++ b/lib/active_pdftk/call.rb @@ -300,10 +300,11 @@ def pdftk_version # def self.locate_pdftk - return @pdftk_located if @pdftk_located - auto_path = %x{locate pdftk | grep "/bin/pdftk"}.strip.split("\n").first - #TODO find a valid Win32 procedure (not in my top priorities) - @pdftk_located = (auto_path.nil? || auto_path.empty?) ? nil : auto_path + @pdftk_location ||= begin + auto_path = %x{locate pdftk | grep "/bin/pdftk"}.strip.split("\n").first + #TODO find a valid Win32 procedure (not in my top priorities) + (auto_path.nil? || auto_path.empty?) ? nil : auto_path + end end def locate_pdftk