module Roda::RodaPlugins::Base::RequestClassMethods
def cached_matcher(obj)
not already cached, yield to get the basic pattern, and convert the
Return the cached pattern for the given object. If the object is
def cached_matcher(obj) cache = @match_pattern_cache unless pattern = cache[obj] pattern = cache[obj] = consume_pattern(yield) end pattern end
def consume_pattern(pattern)
pattern requires the path starts with a string and does not match partial
The pattern to use for consuming, based on the given argument. The returned
def consume_pattern(pattern) /\A\/(?:#{pattern})(?=\/|\z)/ end
def inspect
and then assigned to a constant of the Roda subclass, make inspect
Since RodaRequest is anonymously subclassed when Roda is subclassed,
def inspect "#{roda_class.inspect}::RodaRequest" end