allow expernal code to get a list of sources that the are courier considers open, without having to access internal properties

This commit is contained in:
Spencer Alger 2014-03-05 14:08:01 -07:00
parent f5ba7bcdda
commit cb9c9a4d81

View file

@ -286,5 +286,17 @@ define(function (require) {
this.fetch('doc');
};
// get the list of open data source objects
// primarily for testing purposes
Courier.prototype._openSources = function (type) {
if (!type) {
return _.transform(this._refs, function (open, refs) {
[].push.apply(open, refs);
}, []);
}
return this._refs[type] || [];
};
return Courier;
});