Class: PDF::Writer
- Inherits:
-
Object
- Object
- PDF::Writer
- Defined in:
- app/helpers/invoice_pdf_helper.rb
Overview
:nodoc:
Instance Method Summary collapse
- #on_start_new_page(run_now, serializable_exec) ⇒ Object
- #start_new_page(*args) ⇒ Object
- #start_new_page_without_callback ⇒ Object
Instance Method Details
#on_start_new_page(run_now, serializable_exec) ⇒ Object
51 52 53 54 |
# File 'app/helpers/invoice_pdf_helper.rb', line 51 def on_start_new_page(run_now , serializable_exec) @on_start_new_page = serializable_exec @on_start_new_page.to_proc.call self if run_now end |
#start_new_page(*args) ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 |
# File 'app/helpers/invoice_pdf_helper.rb', line 58 def start_new_page(*args) new_page_proc = @on_start_new_page.to_proc unless @on_start_new_page.nil? or !@on_start_new_page.respond_to?(:to_proc) # This first one is a little ghetto... would be nice if it were actually called on the first page #new_page_proc.call self if current_page_number == 1 and new_page_proc ret = start_new_page_without_callback(*args) new_page_proc.call self if new_page_proc ret end |
#start_new_page_without_callback ⇒ Object
56 |
# File 'app/helpers/invoice_pdf_helper.rb', line 56 alias start_new_page_without_callback start_new_page |