Class: FaradayCage::RackMiddleware
- Inherits:
-
Object
- Object
- FaradayCage::RackMiddleware
- Defined in:
- lib/faraday_cage/rack_middleware.rb
Overview
Wraps Rack apps to allow identification when running multiple.
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ RackMiddleware
constructor
A new instance of RackMiddleware.
Constructor Details
#initialize(app) ⇒ RackMiddleware
Returns a new instance of RackMiddleware.
8 9 10 |
# File 'lib/faraday_cage/rack_middleware.rb', line 8 def initialize(app) @app = app end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
6 7 8 |
# File 'lib/faraday_cage/rack_middleware.rb', line 6 def app @app end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 |
# File 'lib/faraday_cage/rack_middleware.rb', line 12 def call(env) identity_request?(env) ? identity : app.call(env) end |