Class: Quote::LetterPdfGeneratorLegacy
- Inherits:
-
BaseService
- Object
- BaseService
- Quote::LetterPdfGeneratorLegacy
- Includes:
- Pdf::Base
- Defined in:
- app/services/quote/letter_pdf_generator_legacy.rb
Overview
Service object: letter pdf generator (LEGACY pre-modernization layout).
Preserved verbatim so we can fall back / compare if the modernized
Quote::LetterPdfGenerator needs to be reverted. Not wired into any caller.
Defined Under Namespace
Classes: Result
Constant Summary collapse
- BRAND_COLOR =
Brand color.
'd4690e'.freeze
Constants included from Pdf::Base
Pdf::Base::FONT, Pdf::Base::NIMBUS_SANS_PATH, Pdf::Base::NIMBUS_SANS_PATH_BOLD, Pdf::Base::WY_LOGO_PATH
Instance Attribute Summary
Attributes inherited from BaseService
Instance Method Summary collapse
-
#process(quote, options = {}) ⇒ Result
Renders the quote letter PDF.
Methods inherited from BaseService
#initialize, #log_debug, #log_error, #log_info, #log_warning, #logger, #tagged_logger
Constructor Details
This class inherits a constructor from BaseService
Instance Method Details
#process(quote, options = {}) ⇒ Result
Renders the quote letter PDF.
34 35 36 37 38 39 40 41 42 |
# File 'app/services/quote/letter_pdf_generator_legacy.rb', line 34 def process(quote, = {}) opts = () composer = build_composer draw_body(composer, quote, opts) (composer, quote, opts) io = StringIO.new composer.write(io, optimize: true) Result.new(pdf: io.string, quote: quote) end |