Class: Md2Pdf::BackGrounder
- Inherits:
-
Struct
- Object
- Struct
- Md2Pdf::BackGrounder
- Defined in:
- lib/md2pdf/converter.rb
Instance Attribute Summary collapse
-
#background_path ⇒ Object
Returns the value of attribute background_path.
-
#shell ⇒ Object
Returns the value of attribute shell.
-
#temp_filename_creator ⇒ Object
Returns the value of attribute temp_filename_creator.
-
#wrapped_converter ⇒ Object
Returns the value of attribute wrapped_converter.
Instance Method Summary collapse
Instance Attribute Details
#background_path ⇒ Object
Returns the value of attribute background_path
20 21 22 |
# File 'lib/md2pdf/converter.rb', line 20 def background_path @background_path end |
#shell ⇒ Object
Returns the value of attribute shell
20 21 22 |
# File 'lib/md2pdf/converter.rb', line 20 def shell @shell end |
#temp_filename_creator ⇒ Object
Returns the value of attribute temp_filename_creator
20 21 22 |
# File 'lib/md2pdf/converter.rb', line 20 def temp_filename_creator @temp_filename_creator end |
#wrapped_converter ⇒ Object
Returns the value of attribute wrapped_converter
20 21 22 |
# File 'lib/md2pdf/converter.rb', line 20 def wrapped_converter @wrapped_converter end |
Instance Method Details
#convert(input_filename, output_filename) ⇒ Object
21 22 23 24 |
# File 'lib/md2pdf/converter.rb', line 21 def convert(input_filename, output_filename) wrapped_converter.convert(input_filename, temp_filename) shell.exec("pdftk #{temp_filename} multibackground #{background_path} output #{output_filename}") end |
#temp_filename ⇒ Object
25 26 27 |
# File 'lib/md2pdf/converter.rb', line 25 def temp_filename @temp_filename ||= temp_filename_creator.create_file_name end |