Sha256: 1f6aecdd042b486ba53179c04ab58e69bfe49138dd505ff6fca4b3370cc9ff3b
Contents?: true
Size: 804 Bytes
Versions: 289
Compression:
Stored size: 804 Bytes
Contents
var Model = function(params) { for (var thing in params) this[thing] = params[thing]; if (this.options_url) { for (var attrib in this.options_url) this.populate_options(this.options_url[attrib]); } }; Model.prototype = { name: false, id: false, attributes: [], attributes_clean: [], update_url: false, fetch_url: false, options_url: false, options: false, save: function(attrib, after) { if (!attrib.update_url) attrib.update_url = this.update_url; attrib.save(after); }, populate_options: function(after, i) { if (i == null || i == undefined) i = 0; if (i >= this.attributes.length) after(); var this2 = this; this.attributes[i].populate_options(function() { this2.populate_options(after, i+1); }); } };
Version data entries
289 entries across 289 versions & 1 rubygems