addon/route.js
function (options) {
    var Router, args;
    if (this.get('parent')) {
      throw new Error('Only the root route may be exported as an Ember router.');
    }
    args = slice.call(arguments);
    if (!args.length || args[args.length - 1] instanceof Ember.Mixin) {
      args.push(options = {});
    }
    else {
      options = args[args.length - 1];
    }
    options._enhancedRouterRootMeta = this;
    Router = Ember.Router.extend.apply(Ember.Router, args);
    Router.map(this.get('mapFunction'));
    return Router;
  }
function (options) {
    var Router, args;
    if (this.get('parent')) {
      throw new Error('Only the root route may be exported as an Ember router.');
    }
    args = slice.call(arguments);
    if (!args.length || args[args.length - 1] instanceof Ember.Mixin) {
      args.push(options = {});
    }
    else {
      options = args[args.length - 1];
    }
    options._enhancedRouterRootMeta = this;
    Router = Ember.Router.extend.apply(Ember.Router, args);
    Router.map(this.get('mapFunction'));
    return Router;
  }
function ( options ) { var Router , args ; if ( this . get ( 'parent' ) ) { throw new Error ( 'Only the root route may be exported as an Ember router.' ) ; } args = slice . call ( arguments ) ; if ( ! args . length || args [ args . length - 1 ] instanceof Ember . Mixin ) { args . push ( options = { } ) ; } else { options = args [ args . length - 1 ] ; } options . _enhancedRouterRootMeta = this ; Router = Ember . Router . extend . apply ( Ember . Router , args ) ; Router . map ( this . get ( 'mapFunction' ) ) ; return Router ; }
Transforms this RouteMeta into an Ember router

@method toRouter
@param {Object} options
@return {Ember.Router}
Transforms this RouteMeta into an Ember router