Class: Rack::AMF::Middleware::PassThrough

Inherits:
Object
  • Object
show all
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

APPLICATION_AMF

Instance Method Summary collapse

Methods included from Rack::AMF::Middleware

#call, #should_handle?

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, options={}
  @app = app
  Rack::AMF::Environment.populate options
end

Instance Method Details

#handleObject



17
18
19
# File 'lib/rack/amf/middleware/pass_through.rb', line 17

def handle
  @app.call env
end