Skip to content

Commit

Permalink
[DOC release] Adding documentation for SnapshotRecordArray
Browse files Browse the repository at this point in the history
Fixes emberjs#3464
(cherry picked from commit f399928)

Conflicts:
	packages/ember-data/lib/system/snapshot-record-array.js
  • Loading branch information
kylecoberly authored and bmac committed Jul 21, 2015
1 parent 75318e7 commit ede472a
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions packages/ember-data/lib/system/snapshot-record-array.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,51 @@
@param {Object} meta
*/
function SnapshotRecordArray(recordArray, meta, adapterOptions) {
/**
An array of snapshots
@private
@property _snapshots
@type {Array}
*/
this._snapshots = null;
/**
An array of records
@private
@property _recordArray
@type {Array}
*/
this._recordArray = recordArray;
/**
Number of records in the array
@property length
@type {Number}
*/
this.length = recordArray.get('length');
/**
The type of the underlying records for the snapshots in the array, as a DS.Model
@property type
@type {DS.Model}
*/
this.type = recordArray.get('type');
/**
Meta object
@property meta
@type {Object}
*/
this.meta = meta;
/**
A hash of adapter options
@property adapterOptions
@type {Object}
*/
this.adapterOptions = adapterOptions;
}

/**
Get snapshots of the underlying record array
@method snapshots
@return {Array} Array of snapshots
*/
SnapshotRecordArray.prototype.snapshots = function() {
if (this._snapshots) {
return this._snapshots;
Expand Down

0 comments on commit ede472a

Please sign in to comment.