Class: Rack::AMF::ServiceManager

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/amf/service_manager.rb

Instance Method Summary collapse

Constructor Details

#initializeServiceManager

Returns a new instance of ServiceManager.



3
4
5
# File 'lib/rack/amf/service_manager.rb', line 3

def initialize
  @services = {}
end

Instance Method Details

#handle(env) ⇒ Object



12
13
14
15
16
# File 'lib/rack/amf/service_manager.rb', line 12

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

#register(path, service) ⇒ Object



7
8
9
10
# File 'lib/rack/amf/service_manager.rb', line 7

def register path, service
  @services ||= {}
  @services[path] = service
end