From 2eeee31d7c5718bd43ca96d1af23a57b61b2e7bb Mon Sep 17 00:00:00 2001 From: Anders Janmyr Date: Sat, 22 Oct 2011 11:49:59 +0200 Subject: [PATCH] Get the logger instance var from showoff instance --- lib/showoff.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/showoff.rb b/lib/showoff.rb index 5dd49f920..748d0b0d8 100644 --- a/lib/showoff.rb +++ b/lib/showoff.rb @@ -406,6 +406,7 @@ def self.do_static(what) end name = showoff.instance_variable_get(:@pres_name) path = showoff.instance_variable_get(:@root_path) + logger = showoff.instance_variable_get(:@logger) data = showoff.send(what, true) if data.is_a?(File) FileUtils.cp(data.path, "#{name}.pdf") @@ -451,7 +452,7 @@ def self.do_static(what) File.open(css_path) do |file| data = file.read data.scan(/url\((.*)\)/).flatten.each do |path| - @logger.debug path + logger.debug path dir = File.dirname(path) FileUtils.makedirs(File.join(file_dir, dir)) FileUtils.copy(File.join(pres_dir, path), File.join(file_dir, path))