Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Auclair committed Oct 19, 2011
1 parent 3c338a9 commit 90bb3c5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/active_pdftk/call.rb
Expand Up @@ -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
Expand Down

0 comments on commit 90bb3c5

Please sign in to comment.