module Roda::RodaPlugins::OptimizedMatching

  1. lib/roda/plugins/_optimized_matching.rb

The _optimized_matching plugin is automatically used internally to speed up matching when a single argument String instance, String class, Integer class, or Regexp matcher is passed to r.on, r.is_, or a verb method such as r.get or r.post.

The optimization works by avoiding the if_match method if possible. Instead of clearing the captures array on every call, and having the matching append to the captures, it checks directly for the match, and on succesful match, it yields directly to the block without using the captures array.

Constants

TERM = Base::RequestMethods::TERM