module Roda::RodaPlugins::Base::RequestMethods
def consume(pattern)
SCRIPT_NAME to include the matched path, removes the matched
match, returns false without changes. Otherwise, modifies
Attempts to match the pattern to the current path. If there is no
def consume(pattern) if matchdata = pattern.match(@remaining_path) captures = matchdata.captures if defined?(yield) return unless captures = yield(*captures) end @remaining_path = matchdata.post_match @captures.concat(captures) end end