lib/roda/request.rb
# If all of the arguments match, yields to the match block and
# returns the rack response when the block returns.  If any of
# the match arguments doesn't match, does nothing.
If all of the arguments match, yields to the match block and
returns the rack response when the block returns.  If any of
the match arguments doesn't match, does nothing.
If all of the arguments match yields to the match block and returns the rack response when the block returns . If any of the match arguments doesn ' t match does nothing .
def if_match(args)
          path = @remaining_path
          captures = @captures.clear
          if match_all(args)
            block_result(yield(*captures))
            throw :halt, response.finish
          else
            @remaining_path = path
            false
          end
        end
def if_match ( args ) path = @remaining_path captures = @captures . clear if match_all ( args ) block_result ( yield ( * captures ) ) throw :halt , response . finish else @remaining_path = path false end end
If all of the arguments match, yields to the match block and
returns the rack response when the block returns.
If all of the arguments match yields to the match block and returns the rack response when the block returns .
# For every block, we make sure to reset captures so that # nesting matchers won't mess with each other's captures.
args