def add_to_app(self, app, **kwargs):
        """ Instead of adding a route to the flask application this will
        include and load routes similar, same as in the
        :py:class:`flask_via.Via` class.abs

        .. versionchanged:: 2014.05.08

            * ``url_prefix`` now injected into kwargs when loading in routes

        .. versionchanged:: 2014.05.19

            * ``endpoint`` now injects into kwargs when loading in routes

        Arguments
        ---------
        app : flask.app.Flask
            Flask application instance
        \*\*kwargs
            Arbitrary keyword arguments passed in to ``init_app``
        """

        # Routes name can be configured by setting VIA_ROUTES_NAME
        if not self.routes_name:
            self.routes_name = app.config.get('VIA_ROUTES_NAME', 'routes')

        # Inject url_prefix into kwargs
        if self.url_prefix:
            # This allows us to chain url prefix's when multiple includes
            # are called
            try:
                url_prefix = kwargs['url_prefix']
            except __HOLE__:
                url_prefix = ''
            finally:
                kwargs['url_prefix'] = url_prefix + self.url_prefix

        # Inject endpoint into kwagrs
        if self.endpoint is not None:
            # This allows us to add a endpoint prefix to routes included
            try:
                endpoint = kwargs['endpoint']
            except KeyError:
                endpoint = ''
            finally:
                kwargs['endpoint'] = endpoint + self.endpoint + '.'

        # Get the routes
        routes = self.include(self.routes_module, self.routes_name)

        # Load the routes
        self.load(app, routes, **kwargs)
dataset/ETHPy150Open thisissoon/Flask-Via/flask_via/routers/__init__.py/Include.add_to_app