Class: Pdf::Label::Speedee
- Inherits:
-
BaseService
- Object
- BaseService
- Pdf::Label::Speedee
- Includes:
- Base
- Defined in:
- app/services/pdf/label/speedee.rb
Overview
Service object: speedee.
Defined Under Namespace
Classes: Result
Constant Summary collapse
- LOGO_PATH =
Filesystem/URL path for logo.
Rails.root.join("data/images/spee-dee-logo-316x318.png").to_s.freeze
- PAGE_W =
Label: 4 in wide × 6 in tall (portrait)
(4.0 * 72)
- PAGE_H =
432 pt
(6.0 * 72)
Constants included from Base
Base::FONT, Base::NIMBUS_SANS_PATH, Base::NIMBUS_SANS_PATH_BOLD, Base::WY_LOGO_PATH
Instance Method Summary collapse
-
#call(shipment, options = {}) ⇒ Result
The generated PDF result.
Instance Method Details
#call(shipment, options = {}) ⇒ Result
Returns the generated PDF result.
22 23 24 25 26 |
# File 'app/services/pdf/label/speedee.rb', line 22 def call(shipment, = {}) Pdf::Loader.load! pdf = generate(shipment, ) Result.new(pdf: pdf, shipment: shipment, file_name: "#{shipment.reference_number}.pdf") end |