     # fitlers controller and action name
     [@controller_name, @action_name] = to.split '/'
 
+  ###*
+  
+    Extract the url named parameters.
 
+    @method extract_params
+    @param url {String}
+
+  ###
   extract_params:( url )->
     # initialize empty params object
     params = {}

module.exports = class Route

  # static regex for reuse
  @named_param_reg: /:\w+/g
  @splat_param_reg: /\*\w+/g

  # regex matcher
  matcher: null

  # construct variables
  match: null
  to: null
  at: null
  el: null

  # api info
  controller_name: null
  action_name: null
  param_names: null

  constructor:( @match, @to, @at, @el )->

    # prepare regex matcher str for reuse


    return params

  ###*

    @method rewrite_url_with_parms
    @param url {String}
    @param params {Object}

  ###
  rewrite_url_with_parms:( url, params )->
    for key, value of params
      reg = new RegExp "[:\\*]+#{key}", 'g'
      url = url.replace reg, value
    return url

  ###*

    Test given url against the route
    
    @method test
    @param url {String} Url to be tested.
  ###
  test:( url )->
    @matcher.test url