Class: BreezyPDFLite::Intercept::HTML

Inherits:
Base
  • Object
show all
Defined in:
lib/breezy_pdf_lite/intercept/html.rb

Overview

Takes the App’s response body, and submits it to the breezypdf lite endpoint resulting in a file. File is then served with Rack::File

Instance Attribute Summary

Attributes inherited from Base

#body

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

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

Instance Method Details

#callObject



10
11
12
13
14
15
# File 'lib/breezy_pdf_lite/intercept/html.rb', line 10

def call
  request = Rack::Request.new({})
  path = render_request_file.path

  Rack::File.new(path, response_headers).serving(request, path)
end