Class: Middleware::AppTypeDetector
- Inherits:
-
Object
- Object
- Middleware::AppTypeDetector
- Defined in:
- lib/middleware/app_type_detector.rb
Overview
Rack middleware that resolves the Heatwave::AppType for the
current request from the Host header and stashes it on
Heatwave::AppType.current for the duration of the request. Must
be installed near the top of the middleware stack so downstream
middleware/controllers can branch on the value.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ AppTypeDetector
constructor
A new instance of AppTypeDetector.
Constructor Details
#initialize(app) ⇒ AppTypeDetector
Returns a new instance of AppTypeDetector.
19 20 21 |
# File 'lib/middleware/app_type_detector.rb', line 19 def initialize(app) @app = app end |