class PDFService::WebApp

Constants

VALID_SCHEMES

Attributes

pdf_service[R]

Public Class Methods

new(pdf_service:) click to toggle source
Calls superclass method
# File lib/pdf_service/web_app.rb, line 7
def initialize(pdf_service:)
  super()
  @pdf_service = pdf_service
end

Public Instance Methods

ErrorResponse(message, status: 500) click to toggle source
# File lib/pdf_service/web_app.rb, line 41
def ErrorResponse(message, status: 500)
  [status, {'Content-Type' => 'text/plain'}, [message]]
end
PDFResponse(pdf_data, status: 200) click to toggle source
# File lib/pdf_service/web_app.rb, line 45
def PDFResponse(pdf_data, status: 200)
  [status, {'Content-Type' => 'application/pdf'}, [pdf_data]]
end