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.multi_run_apps.keys.sort.reverse)})/
end