       @run url
     , 1
 
-  ###
+  ###*
   Creates and store a route
-  
-  @param [String] route
-  @param [String] to
-  @param [String] at
-  @param [String] el
+  @method map
+  @param route {String}
+  @param to {String} Controller and action to which the route will be sent.
+  @param at {String} Route to be called as a dependency.
+  @param el {String} CSS selector to define where the template will be rendered.
   ###
   map:( route, to, at, el )->
     @routes.push route = new Route route, to, at, el, @


Factory = null

###
Proxies browser's History API, routing request to and from the aplication
###
module.exports = class Router

  routes: []
  listeners: []

  trigger: true

  ###
  @param [theoricus.Theoricus] @the   Shortcut for app's instance
  @param [Function] @on_change  state/url change handler
  ###
  constructor:( @the, @Routes, @on_change )->
    Factory = @the.factory

## Router & Route logic inspired by RouterJS:
## https://github.com/haithembelhaj/RouterJs

###*
  Core module
  @module core
###

StringUril = require 'theoricus/utils/string_util'
Route = require 'theoricus/core/route'
