Class: Dorsale::BillingMachine::PdfFileGenerator
- Defined in:
- app/services/dorsale/billing_machine/pdf_file_generator.rb
Defined Under Namespace
Classes: StringIO
Instance Attribute Summary collapse
-
#document ⇒ Object
readonly
Returns the value of attribute document.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(document) ⇒ PdfFileGenerator
constructor
A new instance of PdfFileGenerator.
Methods inherited from Service
Constructor Details
#initialize(document) ⇒ PdfFileGenerator
Returns a new instance of PdfFileGenerator.
4 5 6 7 |
# File 'app/services/dorsale/billing_machine/pdf_file_generator.rb', line 4 def initialize(document) super() @document = document end |
Instance Attribute Details
#document ⇒ Object (readonly)
Returns the value of attribute document.
2 3 4 |
# File 'app/services/dorsale/billing_machine/pdf_file_generator.rb', line 2 def document @document end |
Instance Method Details
#call ⇒ Object
9 10 11 12 13 |
# File 'app/services/dorsale/billing_machine/pdf_file_generator.rb', line 9 def call document.pdf_file = file document.save! if document.persisted? document end |