Class: HireFire::Middleware
- Inherits:
-
Object
- Object
- HireFire::Middleware
- Defined in:
- lib/hirefire/middleware.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Middleware
constructor
A new instance of Middleware.
Constructor Details
#initialize(app) ⇒ Middleware
Returns a new instance of Middleware.
7 8 9 10 |
# File 'lib/hirefire/middleware.rb', line 7 def initialize(app) @app = app @path_prefix = determine_path_prefix end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/hirefire/middleware.rb', line 12 def call(env) process_request_queue_time(env) if matches_hirefire_path?(env) || matches_info_path?(env) return construct_info_response end @app.call(env) end |