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. Sets env to the Rack::AMF::Request object and env to the Rack::AMF::Response object. Simply modify the response as necessary and it will be automatically serialized and sent.

Instance Method Summary collapse

Constructor Details

#initialize(app, options = {}) ⇒ PassThrough

Returns a new instance of PassThrough.



11
12
13
14
# File 'lib/rack/amf/middleware/pass_through.rb', line 11

def initialize app, options={}
  @app = app
  Rack::AMF::Environment.populate options
end

Instance Method Details

#handleObject



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

def handle
  @app.call env
end