Skip to content

Commit

Permalink
Adds debug-mode only toString method for SC.ChildArray to give a bit …
Browse files Browse the repository at this point in the history
…more information akin to SC.ManyArray & SC.RecordArray.
  • Loading branch information
publickeating committed Mar 21, 2014
1 parent 204d1cd commit 8dae7d9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions frameworks/datastore/system/child_array.js
Expand Up @@ -18,6 +18,20 @@
SC.ChildArray = SC.Object.extend(SC.Enumerable, SC.Array,
/** @scope SC.ChildArray.prototype */ {

//@if(debug)
/* BEGIN DEBUG ONLY PROPERTIES AND METHODS */

/* @private */
toString: function () {
var propertyName = this.get('propertyName'),
length = this.get('length');

return "%@({ propertyName: '%@', length: %@, … })".fmt(sc_super(), propertyName, length);
},

/* END DEBUG ONLY PROPERTIES AND METHODS */
//@endif

/**
If set, it is the default record `recordType`
Expand Down

0 comments on commit 8dae7d9

Please sign in to comment.