Module: Appfuel::Application::Dispatcher
- Included in:
- Root
- Defined in:
- lib/appfuel/application/dispatcher.rb
Instance Method Summary collapse
Instance Method Details
#dispatch(request, container) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/appfuel/application/dispatcher.rb', line 5 def dispatch(request, container) begin container[:feature_initializer].call(request.feature, container) action = container[:action_loader].call(request.namespace, container) response = action.run(request.inputs) rescue => e handler = Appfuel::ResponseHandler.new response = handler.error(e) end response end |