Class: Rack::AMF::Middleware::PassThrough
- Inherits:
-
Object
- Object
- Rack::AMF::Middleware::PassThrough
- Includes:
- Rack::AMF::Middleware
- Defined in:
- lib/rack/amf/middleware/pass_through.rb
Overview
Middleware which simply passes AMF requests through. If the request is a valid AMF request to be handled, sets env ['rack-amf.request']
to an initialized RocketAMF::Request object and env ['rack-amf.response']
to a RocketAMF::Response object. Simply modify the response as necessary and it will be automatically serialized and sent.
Constant Summary
Constants included from Rack::AMF::Middleware
Instance Method Summary collapse
- #handle ⇒ Object
-
#initialize(app, options = {}) ⇒ PassThrough
constructor
A new instance of PassThrough.
Methods included from Rack::AMF::Middleware
Constructor Details
#initialize(app, options = {}) ⇒ PassThrough
Returns a new instance of PassThrough.
12 13 14 15 |
# File 'lib/rack/amf/middleware/pass_through.rb', line 12 def initialize app, ={} @app = app Rack::AMF::Environment.populate end |
Instance Method Details
#handle ⇒ Object
17 18 19 |
# File 'lib/rack/amf/middleware/pass_through.rb', line 17 def handle @app.call env end |