Class: Rack::AMF::Middleware::ServiceManager
- Inherits:
-
Object
- Object
- Rack::AMF::Middleware::ServiceManager
- 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.
Constant Summary
Constants included from Rack::AMF::Middleware
Instance Method Summary collapse
- #handle(env) ⇒ Object
-
#initialize(app, options = {}) ⇒ ServiceManager
constructor
A new instance of ServiceManager.
Methods included from Rack::AMF::Middleware
Constructor Details
#initialize(app, options = {}) ⇒ ServiceManager
Returns a new instance of ServiceManager.
10 11 12 13 |
# File 'lib/rack/amf/middleware/service_manager.rb', line 10 def initialize app, ={} @app = app Rack::AMF::Environment.populate end |
Instance Method Details
#handle(env) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/rack/amf/middleware/service_manager.rb', line 15 def handle env req = env['rack-amf.request'] res = env['rack-amf.response'] logger = ::Logger.new(env['rack.errors']) res.each_method_call req do |method, args| handle_method method, args, logger end end |