o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1314578834.127658: @value{I" class:EFI"BundledAsset; FI"id; F"%05a1cd4495dbf33626859523eeadbc7dI"logical_path; F"alpha_simprini/model.jsI" pathname; FI"`/Users/collin/Code/alpha-simprini-engine/app/assets/javascripts/alpha_simprini/model.coffee; TI"content_type; FI"application/javascript; FI" mtime; FI"2011-08-28T19:47:11-05:00; FI" body; FI"<(function() { var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; module("AS", function() { this.All = new AS.Collection; this.HasManyCollection = AS.Collection.extend(); return this.Model = (function() { __extends(Model, Backbone.Model); function Model() { Model.__super__.constructor.apply(this, arguments); } AS.Event["extends"](Model); Model.associated = function(name) { var _ref; if ((_ref = this.associations) == null) { this.associations = []; } return this.associations.push(name); }; console.error("FIXME: eval? really???"); Model.has_many = function(name, options) { var _ref; this.associated(name); if ((_ref = this.has_manys) == null) { this.has_manys = {}; } options.collection_factory = function() { options.model = eval(options.model_name); return new (AS.HasManyCollection.extend(options)); }; return this.has_manys[name] = options; }; Model.belongs_to = function(name) { var _ref; this.associated(name); if ((_ref = this.belongs_to) == null) { this.belongs_to = {}; } this.belongs_to[name] = {}; return this.prototype["write_" + name] = function(now, object) { var change_listener, _name, _ref2, _ref3; if (object.constructor === String) { object = AS.All.get(object); } change_listener = (_ref2 = this[_name = "" + name + "_change_listener"]) != null ? _ref2 : this[_name] = __bind(function() { return this.trigger("change:" + name, this[name]); }, this); if ((_ref3 = this[name]) != null) { _ref3.unbind("change", change_listener); } object.bind("change", change_listener); return this.attributes[name] = object; }; }; Model.prototype.set = function(attrs) { var key, value, writer; for (key in attrs) { value = attrs[key]; if (writer = this["write_" + key]) { writer.call(this, attrs, value); delete attrs[key]; } } return Model.__super__.set.apply(this, arguments); }; Model.prototype.initialize = function() { var association, attrs, config, _ref, _results; AS.All.add(this); Model.__super__.initialize.apply(this, arguments); _ref = this.constructor.has_manys; _results = []; for (association in _ref) { config = _ref[association]; attrs = {}; _results.push(__bind(function(association, config, attrs) { var collection, raw_data; if (this.attributes[association]) { raw_data = this.attributes[association]; } collection = attrs[association] = config.collection_factory(); collection.source = this; if (raw_data) { collection.add(raw_data); } return this.set(attrs); }, this)(association, config, attrs)); } return _results; }; return Model; })(); }); }).call(this); ; TI"asset_paths; F[I"`/Users/collin/Code/alpha-simprini-engine/app/assets/javascripts/alpha_simprini/model.coffee; TI"dependency_paths; F[{I" path; FI"`/Users/collin/Code/alpha-simprini-engine/app/assets/javascripts/alpha_simprini/model.coffee; TI" mtime; FIu: Time  ß€°¼: @_zoneI"CDT; T: offsetiþ°¹I"hexdigest; F"%e089189bbd027526f8cb2a499786f1a9I" _version; F"%a697d8e69dd5bf8f3a29159773d6c5f5