Sha256: 71f7e54639c5197973b4e94250673a96682212adbabc88f9b58b3faaac06be0c

Contents?: true

Size: 567 Bytes

Versions: 16

Compression:

Stored size: 567 Bytes

Contents

module Appfuel
  module Application
    module Dispatcher

      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 Appfuel::Handler::HandlerFailure => e
          response = e.response
        rescue => e
          handler = Appfuel::ResponseHandler.new
          response = handler.error(e)
        end

        response
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
appfuel-0.6.9 lib/appfuel/application/dispatcher.rb
appfuel-0.6.8 lib/appfuel/application/dispatcher.rb
appfuel-0.6.7 lib/appfuel/application/dispatcher.rb
appfuel-0.6.6 lib/appfuel/application/dispatcher.rb
appfuel-0.6.5 lib/appfuel/application/dispatcher.rb
appfuel-0.6.4 lib/appfuel/application/dispatcher.rb
appfuel-0.6.3 lib/appfuel/application/dispatcher.rb
appfuel-0.6.1 lib/appfuel/application/dispatcher.rb
appfuel-0.5.16 lib/appfuel/application/dispatcher.rb
appfuel-0.5.15 lib/appfuel/application/dispatcher.rb
appfuel-0.5.14 lib/appfuel/application/dispatcher.rb
appfuel-0.5.13 lib/appfuel/application/dispatcher.rb
appfuel-0.5.12 lib/appfuel/application/dispatcher.rb
appfuel-0.5.11 lib/appfuel/application/dispatcher.rb
appfuel-0.5.10 lib/appfuel/application/dispatcher.rb
appfuel-0.5.9 lib/appfuel/application/dispatcher.rb