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.



124
125
126
# File 'lib/roda/plugins/multi_run.rb', line 124

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.



119
120
121
# File 'lib/roda/plugins/multi_run.rb', line 119

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