Class: BreezyPDF::Intercept::PublicUrl

Inherits:
Base
  • Object
show all
Defined in:
lib/breezy_pdf/intercept/public_url.rb

Overview

:nodoc

Instance Attribute Summary

Attributes inherited from Base

#app, #env

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from BreezyPDF::Intercept::Base

Instance Method Details

#callObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/breezy_pdf/intercept/public_url.rb', line 6

def call
  BreezyPDF.logger.info("[BreezyPDF] Requesting render of #{rendered_url}")
  response = BreezyPDF::RenderRequest.new(rendered_url, ).submit

  [
    302,
    { "Location" => response.download_url, "Content-Type" => "text/html", "Content-Length" => "0" },
    []
  ]
end