lib/roda/request.rb
def consume(pattern)
          if matchdata = pattern.match(@remaining_path)
            @remaining_path = matchdata.post_match
            captures = matchdata.captures
            captures = yield(*captures) if defined?(yield)
            @captures.concat(captures)
          end
        end
# Attempts to match the pattern to the current path.  If there is no
# match, returns false without changes.  Otherwise, modifies
# SCRIPT_NAME to include the matched path, removes the matched
# path from PATH_INFO, and updates captures with any regex captures.
Attempts to match the pattern to the current path.  If there is no
match, returns false without changes.  Otherwise, modifies
SCRIPT_NAME to include the matched path, removes the matched
path from PATH_INFO, and updates captures with any regex captures.
Attempts to match the pattern to the current path . If there is no match returns false without changes . Otherwise modifies SCRIPT_NAME to include the matched path removes the matched path from PATH_INFO and updates captures with any regex captures .
def consume(pattern)
          if matchdata = pattern.match(@remaining_path)
            @remaining_path = matchdata.post_match
            captures = matchdata.captures
            captures = yield(*captures) if defined?(yield)
            @captures.concat(captures)
          end
        end
def consume ( pattern ) if matchdata = pattern . match ( @remaining_path ) @remaining_path = matchdata . post_match captures = matchdata . captures captures = yield ( * captures ) if defined? ( yield ) @captures . concat ( captures ) end end
Attempts to match the pattern to the current path.
Attempts to match the pattern to the current path .
pattern