lib/roda/request.rb
# Match the given symbol if any segment matches.
Match the given symbol if any segment matches.
Match the given symbol if any segment matches .
def _match_symbol(sym=nil)
          rp = @remaining_path
          if rp.getbyte(0) == 47
            if last = rp.index('/', 1)
              @captures << rp[1, last-1]
              @remaining_path = rp[last, rp.length]
            elsif (len = rp.length) > 1
              @captures << rp[1, len]
              @remaining_path = ""
            end
          end
        end
def _match_symbol ( sym = nil ) rp = @remaining_path if rp . getbyte ( 0 ) == 47 if last = rp . index ( '/' , 1 ) @captures << rp [ 1 , last - 1 ] @remaining_path = rp [ last , rp . length ] elsif ( len = rp . length ) > 1 @captures << rp [ 1 , len ] @remaining_path = "" end end end
Match the given symbol if any segment matches.
Match the given symbol if any segment matches .
sym