Sha256: 792cdcb465128837284abfa2c9a546b8ed01fc4f12946492dbacb72439d16416
Contents?: true
Size: 1.33 KB
Versions: 11
Compression:
Stored size: 1.33 KB
Contents
I"K(function() { App.Mixins.Connectivity = (function() { function Connectivity() {} Connectivity.prototype.connectWith = function(data, opts) { var i, identity, len, ref; if (opts == null) { opts = {}; } if (data == null) { return null; } if (data.constructor.name === "Array") { ref = _.uniq(_.map(data, function(obj) { return obj.getIdentity(); })); for (i = 0, len = ref.length; i < len; i++) { identity = ref[i]; App.IdentityMap.addCollection(identity, { to: this }); if (opts.receiver != null) { this.receivers[identity] = opts.receiver; } } return; } if (opts.receiver != null) { this.receivers[data.toKey()] = opts.receiver; } return App.IdentityMap.connect(this, { "with": data }); }; Connectivity.prototype.receiverFor = function(data) { if (data.constructor.name === "String") { if (this.receivers[data] != null) { return this.receivers[data]; } else { return null; } } if (this.receivers[data.toKey()] != null) { return this.receivers[data.toKey()]; } return null; }; return Connectivity; })(); }).call(this); :ET
Version data entries
11 entries across 4 versions & 1 rubygems