From 8f2ff90187f06c03c99075bf90b59801bd750154 Mon Sep 17 00:00:00 2001 From: Kyle Coberly Date: Sat, 18 Jul 2015 11:56:44 -0600 Subject: [PATCH] [DOC release] Adding documentation for SnapshotRecordArray Fixes #3464 --- .../lib/system/snapshot-record-array.js | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/packages/ember-data/lib/system/snapshot-record-array.js b/packages/ember-data/lib/system/snapshot-record-array.js index 5650d633acd..130cde032c2 100644 --- a/packages/ember-data/lib/system/snapshot-record-array.js +++ b/packages/ember-data/lib/system/snapshot-record-array.js @@ -11,14 +11,51 @@ @param {Object} meta */ export default 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;