Permalink
Browse files

Move command back into pdf_from_string

  • Loading branch information...
unixmonkey committed Jun 29, 2011
1 parent 8a23686 commit 804b57139f55066d5e4630345df2d2bf46d9f5c5
Showing with 2 additions and 8 deletions.
  1. +2 −8 lib/wicked_pdf.rb
View
@@ -22,15 +22,9 @@ def initialize(wkhtmltopdf_binary_path = nil)
raise "Wkhtmltopdf is not executable" unless File.executable?(@exe_path)
end
- def command
- "#{@exe_path} #{parse_options(options)} -q - - " # -q for no errors on stdout
- end
-
- def log_debug
- p "*"*15 + command + "*"*15 unless defined?(Rails) and Rails.env != 'development'
- end
-
def pdf_from_string(string, options={})
+ command = "#{@exe_path} #{parse_options(options)} -q - - " # -q for no errors on stdout
+ p "*"*15 + command + "*"*15 unless defined?(Rails) and Rails.env != 'development'
pdf = IO.popen(command, 'wb+') do |stream|
stream.puts(string)
stream.close_write

0 comments on commit 804b571

Please sign in to comment.