'Create a router for the given routes.Mapper.
Each route in `mapper` must specify a \'controller\', which is a
WSGI app to call.  You\'ll probably want to specify an \'action\' as
well and have your controller be an object that can route
the request to the action-specific method.
Examples:
mapper = routes.Mapper()
sc = ServerController()
# Explicit mapping of one route to a controller+action
mapper.connect(None, \'/svrlist\', controller=sc, action=\'list\')
# Actions are all implicitly defined
mapper.resource(\'server\', \'servers\', controller=sc)
# Pointing to an arbitrary WSGI app.  You can specify the
# {path_info:.*} parameter so the target app can be handed just that
# section of the URL.
mapper.connect(None, \'/v1.0/{path_info:.*}\', controller=BlogApp())'

def __init__(self, mapper):

    self.map = mapper
    self._router = routes.middleware.RoutesMiddleware(self._dispatch, self.map)
