Class: Phpfaker::Middleware
- Inherits:
-
Object
- Object
- Phpfaker::Middleware
- Defined in:
- lib/phpfaker/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.
8 9 10 |
# File 'lib/phpfaker/middleware.rb', line 8 def initialize app @app = app end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/phpfaker/middleware.rb', line 12 def call env hack_path env status, headers, body = @app.call env hack_redirect env, status, headers set_php_header headers [status, headers, body] end |