build/rekord.js
function Rekord(options)
{
  var promise = Rekord.get( options.name );

  if ( promise.isComplete() )
  {
    return promise.results[0];
  }

  Rekord.trigger( Rekord.Events.Options, [options] );

  var database = new Database( options );

  var model = Class.dynamic(
    Model,
    new Model( database ),
    database.className,
    '(props, remoteData) { this.$init( props, remoteData ) }'
  );

  database.Model = model;
  model.Database = database;

  Rekord.classes[ database.name ] = model;

  Rekord.trigger( Rekord.Events.Plugins, [model, database, options] );

  if ( Rekord.autoload )
  {
    database.loadBegin(function onLoadFinish(success)
    {
      if ( success )
      {
        database.loadFinish();
      }
    });
  }
  else
  {
    Rekord.unloaded.push( database );
  }

  Rekord.get( database.name ).resolve( model );
  Rekord.get( database.className ).resolve( model );

  Rekord.debug( Rekord.Debugs.CREATION, database, options );

  return model;
}
function Rekord(options)
{
  var promise = Rekord.get( options.name );

  if ( promise.isComplete() )
  {
    return promise.results[0];
  }

  Rekord.trigger( Rekord.Events.Options, [options] );

  var database = new Database( options );

  var model = Class.dynamic(
    Model,
    new Model( database ),
    database.className,
    '(props, remoteData) { this.$init( props, remoteData ) }'
  );

  database.Model = model;
  model.Database = database;

  Rekord.classes[ database.name ] = model;

  Rekord.trigger( Rekord.Events.Plugins, [model, database, options] );

  if ( Rekord.autoload )
  {
    database.loadBegin(function onLoadFinish(success)
    {
      if ( success )
      {
        database.loadFinish();
      }
    });
  }
  else
  {
    Rekord.unloaded.push( database );
  }

  Rekord.get( database.name ).resolve( model );
  Rekord.get( database.className ).resolve( model );

  Rekord.debug( Rekord.Debugs.CREATION, database, options );

  return model;
}
function Rekord ( options ) { var promise = Rekord . get ( options . name ) ; if ( promise . isComplete ( ) ) { return promise . results [ 0 ] ; } Rekord . trigger ( Rekord . Events . Options , [ options ] ) ; var database = new Database ( options ) ; var model = Class . dynamic ( Model , new Model ( database ) , database . className , '(props, remoteData) { this.$init( props, remoteData ) }' ) ; database . Model = model ; model . Database = database ; Rekord . classes [ database . name ] = model ; Rekord . trigger ( Rekord . Events . Plugins , [ model , database , options ] ) ; if ( Rekord . autoload ) { database . loadBegin ( function onLoadFinish ( success ) { if ( success ) { database . loadFinish ( ) ; } } ) ; } else { Rekord . unloaded . push ( database ) ; } Rekord . get ( database . name ) . resolve ( model ) ; Rekord . get ( database . className ) . resolve ( model ) ; Rekord . debug ( Rekord . Debugs . CREATION , database , options ) ; return model ; }
Creates a Rekord object given a set of options. A Rekord object is also the
constructor for creating instances of the Rekord object defined.

@namespace
@param {Object} options
The options of
Creates a Rekord object given a set of options . A Rekord object is also the constructor for creating instances of the Rekord object defined .