lib/fukuzatsu/formatters/base.rb in fukuzatsu-0.9.13 vs lib/fukuzatsu/formatters/base.rb in fukuzatsu-0.9.14
- old
+ new
@@ -26,20 +26,24 @@
output_path = "#{root_path}/#{self.file.path_to_file.split('/')[0..-2].join("/")}"
FileUtils.mkpath(output_path)
output_path
end
+ def path_to_results
+ "#{output_path}/#{filename}"
+ end
+
def filename
self.file.path_to_file.split('/')[-1] + file_extension
end
def file_extension
""
end
def export
begin
- outfile = File.open("#{output_path}/#{filename}", 'w')
+ outfile = File.open("#{path_to_results}", 'w')
outfile.write(content)
rescue Exception => e
puts "Unable to write output: #{e} #{e.backtrace}"
ensure
outfile && outfile.close