Module: Roda::RodaPlugins::OptimizedMatching

Defined in:


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

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.

Defined Under Namespace

Modules: RequestMethods

Constant Summary collapse