Class: MiniCamel::RouteDispatcher
- Inherits:
-
Object
- Object
- MiniCamel::RouteDispatcher
- Defined in:
- lib/mini_camel/route_dispatcher.rb
Instance Method Summary collapse
Instance Method Details
#dispatch ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/mini_camel/route_dispatcher.rb', line 12 def dispatch raise EnvironmentNotFinalized, "Please finalize the environment." unless env.finalized? exchange = Exchange.new(context: Context.new(with_data)) env.call_route(route, exchange) exchange rescue Exception => error rescue_error(error, exchange) exchange end |