Class: Pdf
- Inherits:
-
Object
- Object
- Defined in:
- lib/cv/generator/pdf.rb
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(yaml_file) ⇒ Pdf
constructor
A new instance of Pdf.
Constructor Details
#initialize(yaml_file) ⇒ Pdf
Returns a new instance of Pdf.
7 8 9 10 |
# File 'lib/cv/generator/pdf.rb', line 7 def initialize(yaml_file) @yaml_file = yaml_file @css_files = [] end |
Instance Method Details
#generate ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/cv/generator/pdf.rb', line 12 def generate load_data generate_html generate_pdf ensure @html_file.close && @html_file.unlink if @html_file @css_files.each do |css_file| css_file.close css_file.unlink end if @css_files end |