Class: FlipperTrail::Middleware
- Inherits:
-
Object
- Object
- FlipperTrail::Middleware
- Defined in:
- lib/flipper_trail/middleware.rb
Overview
Rack middleware that resolves the current actor for the duration of a request and stores it on Current, so flag changes during that request are attributed to it.
Instance Method Summary collapse
-
#call(env) ⇒ Array(Integer, Hash, #each)
Sets the resolved actor on Current for the wrapped request.
-
#initialize(app, resolver: nil) ⇒ Middleware
constructor
A new instance of Middleware.
Constructor Details
#initialize(app, resolver: nil) ⇒ Middleware
Returns a new instance of Middleware.
17 18 19 20 |
# File 'lib/flipper_trail/middleware.rb', line 17 def initialize(app, resolver: nil) @app = app @resolver = resolver end |