Class: Pakyow::Actions::Dispatch
- Inherits:
-
Object
- Object
- Pakyow::Actions::Dispatch
- Defined in:
- lib/pakyow/actions/dispatch.rb
Instance Method Summary collapse
Instance Method Details
#call(connection) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/pakyow/actions/dispatch.rb', line 6 def call(connection) catch :halt do Pakyow.apps.each do |app| if connection.path.start_with?(app.mount_path) app.call(connection) end end end unless connection.halted? error_404(connection) end rescue StandardError => error connection.error = error connection.logger.houston(error) error_500(connection) end |