Class: BreezyPDFLite::Middleware
- Inherits:
-
Object
- Object
- BreezyPDFLite::Middleware
- Defined in:
- lib/breezy_pdf_lite/middleware.rb
Overview
Rack Middleware for BreezyPDFLite Determines if the request should be intercepted or not
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, _options = {}) ⇒ Middleware
constructor
A new instance of Middleware.
Constructor Details
#initialize(app, _options = {}) ⇒ Middleware
Returns a new instance of Middleware.
7 8 9 |
# File 'lib/breezy_pdf_lite/middleware.rb', line 7 def initialize(app, = {}) @app = app end |
Instance Method Details
#call(env) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/breezy_pdf_lite/middleware.rb', line 11 def call(env) if intercept?(env) Interceptor.new(@app, env).call else @app.call(env) end end |