module Roda::RodaPlugins::MultiRun::RequestClassMethods

def multi_run_regexp

Refresh the multi_run_regexp if it hasn’t been loaded yet.

def multi_run_regexp
  @multi_run_regexp || refresh_multi_run_regexp!
end

def refresh_multi_run_regexp!

preferring longer routes before shorter routes.
Refresh the multi_run_regexp, using the stored route prefixes,

def refresh_multi_run_regexp!
  @multi_run_regexp = /(#{Regexp.union((roda_class.opts[:multi_run_apps].keys + roda_class.opts[:multi_run_app_blocks].keys).sort.reverse)})/
end