Class: Rack::AMF::Middleware::ServiceManager

Inherits:
Object
  • Object
show all
Includes:
Rack::AMF::Middleware
Defined in:
lib/rack/amf/middleware/service_manager.rb

Overview

Internal AMF handler, it uses the ServiceManager to handle request service mapping.

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ServiceManager.



9
10
11
12
# File 'lib/rack/amf/middleware/service_manager.rb', line 9

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

Instance Method Details

#handle(env) ⇒ Object



14
15
16
17
18
# File 'lib/rack/amf/middleware/service_manager.rb', line 14

def handle env
  env['rack-amf.response'].each_method_call do |method, args|
    handle_method method, args
  end
end