     @levels.last()
   
   match: (path) ->
+    # console.log "PinkmanPath#match - path arg: #{path}"
     path = new PinkmanPath(path) if Pinkman.isString(path)
     if PinkmanPath.isInstance(path) and path.depth == @depth
       # console.log 'tentou'

  
  setup: (route,url) ->
    if route? and url?
      urlPath = new PinkmanPath(url) 
      route.path.matchParams(urlPath)
      @set('url',url)

class window.PinkmanPath extends Pinkman.object
   
  constructor: (url) ->
    if PinkmanCache.has("p-path-#{url}")
      return(PinkmanCache.get("p-path-#{url}"))
    else
      # setting params
      paramsRegex = /\?.*/
      if paramsRegex.test(url)
        paramsString = /\?(.*)/.exec(url)[1]
        @query = JSON.parse('{"' + decodeURI(paramsString).replace(/"/g, '\\"').replace(/&/g, '","').replace(/=/g,'":"') + '"}')
        url = url.replace("?#{paramsString}", '')
      
      
      @levels = new Pinkman.collection
      @static = new Pinkman.collection
      @dynamic = new Pinkman.collection
