Module: Roda::RodaPlugins::MultiRun::RequestClassMethods

Defined in:
lib/roda/plugins/multi_run.rb

Instance Method Summary collapse

Instance Method Details

#multi_run_regexpObject

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



84
85
86
# File 'lib/roda/plugins/multi_run.rb', line 84

def multi_run_regexp
  @multi_run_regexp || refresh_multi_run_regexp!
end

#refresh_multi_run_regexp!Object

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



79
80
81
# File 'lib/roda/plugins/multi_run.rb', line 79

def refresh_multi_run_regexp!
  @multi_run_regexp = /(#{Regexp.union(roda_class.multi_run_apps.keys.sort.reverse)})/
end