Module: Roda::RodaPlugins::MultiRun::RequestMethods
- Defined in:
- lib/roda/plugins/multi_run.rb
Instance Method Summary collapse
-
#multi_run ⇒ Object
If one of the stored route prefixes match the current request, dispatch the request to the appropriate rack application.
Instance Method Details
#multi_run ⇒ Object
If one of the stored route prefixes match the current request, dispatch the request to the appropriate rack application.
132 133 134 135 136 137 138 |
# File 'lib/roda/plugins/multi_run.rb', line 132 def multi_run on self.class.multi_run_regexp do |prefix| yield prefix if defined?(yield) opts = scope.opts run(opts[:multi_run_apps][prefix] || opts[:multi_run_app_blocks][prefix].call) end end |