public/lib/emberjs/ember.js
function(callback) {
        var router = this.router;
        if (!router) {
          router = new Router();

          
            router._triggerWillChangeContext = Ember.K;
            router._triggerWillLeave = Ember.K;
          

          router.callbacks = [];
          router.triggerEvent = triggerEvent;
          this.reopenClass({ router: router });
        }

        var dsl = EmberRouterDSL.map(function() {
          this.resource('application', { path: "/" }, function() {
            for (var i=0; i < router.callbacks.length; i++) {
              router.callbacks[i].call(this);
            }
            callback.call(this);
          });
        });

        router.callbacks.push(callback);
        router.map(dsl.generate());
        return router;
      }
function(callback) {
        var router = this.router;
        if (!router) {
          router = new Router();

          
            router._triggerWillChangeContext = Ember.K;
            router._triggerWillLeave = Ember.K;
          

          router.callbacks = [];
          router.triggerEvent = triggerEvent;
          this.reopenClass({ router: router });
        }

        var dsl = EmberRouterDSL.map(function() {
          this.resource('application', { path: "/" }, function() {
            for (var i=0; i < router.callbacks.length; i++) {
              router.callbacks[i].call(this);
            }
            callback.call(this);
          });
        });

        router.callbacks.push(callback);
        router.map(dsl.generate());
        return router;
      }
function ( callback ) { var router = this . router ; if ( ! router ) { router = new Router ( ) ; router . _triggerWillChangeContext = Ember . K ; router . _triggerWillLeave = Ember . K ; router . callbacks = [ ] ; router . triggerEvent = triggerEvent ; this . reopenClass ( { router : router } ) ; } var dsl = EmberRouterDSL . map ( function ( ) { this . resource ( 'application' , { path : "/" } , function ( ) { for ( var i = 0 ; i < router . callbacks . length ; i ++ ) { router . callbacks [ i ] . call ( this ) ; } callback . call ( this ) ; } ) ; } ) ; router . callbacks . push ( callback ) ; router . map ( dsl . generate ( ) ) ; return router ; }
The `Router.map` function allows you to define mappings from URLs to routes
and resources in your application. These mappings are defined within the
supplied callback function using `this.resource` and `this.route`.

```javascript
App.Router.map(function({
this.route('about');
this.resource('article');
}));
```

For more detailed examples please see
[the guides](http://emberjs.com/guides/routing/defining-your-routes/).

@method map
@param callback
The Router . map function allows you to define mappings from URLs to routes and resources in your application . These mappings are defined within the supplied callback function using this . resource and this . route .