module Roda::RodaPlugins::MultiRoute::RequestClassMethods
def clear_named_route_regexp!(namespace=nil)
during development it's useful to support new named routes
This shouldn't be an issue in production applications, but
the next time it is needed.
Clear cached regexp for named routes, it will be regenerated
def clear_named_route_regexp!(namespace=nil) @namespaced_route_regexps.delete(namespace) end
def named_route_regexp(namespace=nil)
def named_route_regexp(namespace=nil) @namespaced_route_regexps[namespace] ||= /(#{Regexp.union(roda_class.named_routes(namespace).select{|s| s.is_a?(String)}.sort.reverse)})/ end