o: ActiveSupport::Cache::Entry :@created_atf1364836746.397554:@expires_in0: @value"å{I" class:EFI"ProcessedAsset;FI"logical_path;FI"modularity/modularity.js;TI" pathname;FI"‘/Users/kevin/.rbenv/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/modularity-rails-0.22.1/app/assets/javascripts/modularity/modularity.coffee;TI"content_type;FI"application/javascript;FI" mtime;FI"2013-03-16T09:03:15-07:00;FI" length;FiäI" digest;F"%e6b63f4aa06d7eb841c3e2c60d77bb12I" source;FI"ä(function() { var _this = this, __slice = [].slice; this.modularity = { assert: function(condition, message) { if (!condition || (condition != null ? condition.length : void 0) === 0) { alert(message); return false; } return true; }, bind_global_event: function(event_type, callback) { if (!modularity.assert(typeof event_type === 'string', "modularity.bind_global_event: parameter 'event_type' is empty")) { return; } if (typeof callback !== 'function') { return alert("modularity.bind_global_event: parameter 'callback' must be a function, " + callback + " (" + (typeof callback) + ") given."); } return modularity.global_event_container().bind(event_type, callback); }, fire_global_event: function(event_type, data) { modularity.assert(event_type, 'Module.fire_global_event: You must provide the event type to fire.'); if (typeof event_type !== 'string') { return alert("Module.fire_global_event: Event type must be a string, " + event_type + " (" + (typeof event_type) + ") given."); } return modularity.global_event_container().trigger(event_type, data != null ? data : data = []); }, global_event_container: function() { return modularity.global_event_container_cache || (modularity.global_event_container_cache = $(window)); } }; this.modularity.bindGlobalEvent = this.modularity.bind_global_event; this.modularity.fireGlobalEvent = this.modularity.fire_global_event; this.modularity.Module = (function() { function Module(container) { var method, methodName, mixin_data, _fn, _i, _len, _ref, _ref1, _ref2, _ref3, _this = this; this.trigger = function(event_type, data) { return Module.prototype.trigger.apply(_this, arguments); }; this.on = function(event_type, callback) { return Module.prototype.on.apply(_this, arguments); }; if ((typeof container === 'string') && container !== 'testing') { container = $(container); } this.container = container; if (this.container == null) { return alert('Error in Module constructor: No container given.'); } if (container !== 'testing') { if (typeof container.jquery !== 'string') { return alert('Error in Module constructor: The given container must be a jQuery object.'); } if (!((container != null) && container.length > 0)) { return alert("Error in Module constructor: The given container ('" + container.selector + "') is empty."); } if (!((container != null) && container.length === 1)) { return alert("Error in Module constructor: The given container ('" + container.selector + "') has more than one element."); } } if (this.mixins != null) { _ref = this.mixins; for (_i = 0, _len = _ref.length; _i < _len; _i++) { mixin_data = _ref[_i]; _ref1 = mixin_data.mixin; _fn = function(methodName, method) { if (!_this[methodName]) { return _this[methodName] = function() { return method.apply(_this, arguments); }; } }; for (methodName in _ref1) { method = _ref1[methodName]; _fn(methodName, method); } if ((_ref2 = mixin_data.mixin) != null) { if ((_ref3 = _ref2.constructor) != null) { _ref3.apply(this, arguments); } } } } } Module.prototype.$ = function(query) { return this.container.find(query); }; Module.prototype.autobind = function() { var callback, element, event_name, field, my_callbacks, my_fields, _i, _j, _len, _len1; my_fields = []; my_callbacks = []; for (element in this) { switch (typeof this[element]) { case 'object': my_fields.push(element); break; case 'function': if (modularity.string_starts_with(element, 'on_')) { my_callbacks.push(element); } } } for (_i = 0, _len = my_fields.length; _i < _len; _i++) { field = my_fields[_i]; for (_j = 0, _len1 = my_callbacks.length; _j < _len1; _j++) { callback = my_callbacks[_j]; if (modularity.string_starts_with(callback, "on_" + field + "_")) { event_name = callback.substring(4 + field.length); this[field].on(event_name, this[callback]); } } } return false; }; Module.prototype.on = function(event_type, callback) { if (!modularity.assert(typeof event_type === 'string', "Module.bind_event: parameter 'event_type' is empty")) { return; } if (typeof callback !== 'function') { return alert("Module.bind_event: parameter 'callback' must be a function, " + callback + " (" + (typeof callback) + ") given."); } return this.container.bind(event_type, callback); }; Module.prototype.bindEvent = Module.prototype.bind_event; Module.prototype.bind_event = Module.prototype.bind_event; Module.prototype.trigger = function(event_type, data) { modularity.assert(event_type, 'Module.fire_event: You must provide the event type to fire.'); if (typeof event_type !== 'string') { return alert("Module.fire_event: Event type must be a string, " + event_type + " (" + (typeof event_type) + ") given."); } return this.container.trigger(event_type, data != null ? data : data = {}); }; Module.prototype.fireEvent = Module.prototype.fire_event; Module.prototype.fire_event = Module.prototype.fire_event; Module.prototype.hide = function() { return this.container.hide(); }; Module.mixin = function() { var mixin, p, _base; mixin = arguments[0], p = 2 <= arguments.length ? __slice.call(arguments, 1) : []; if (!mixin) { alert("mixin not found"); } (_base = this.prototype).mixins || (_base.mixins = []); return this.prototype.mixins.push({ mixin: mixin, params: p }); }; Module.prototype.show = function() { return this.container.show(); }; return Module; })(); }).call(this); ;TI"dependency_digest;F"%d667b885964ddf43eb08dfc3bc272ae5I"required_paths;F[I"|/Users/kevin/.rbenv/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/jquery-rails-2.2.1/vendor/assets/javascripts/jquery.js;TI"‘/Users/kevin/.rbenv/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/modularity-rails-0.22.1/app/assets/javascripts/modularity/modularity.coffee;TI"™/Users/kevin/.rbenv/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/modularity-rails-0.22.1/app/assets/javascripts/modularity/tools/string_tools.coffee;TI"dependency_paths;F[{I" path;FI"‘/Users/kevin/.rbenv/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/modularity-rails-0.22.1/app/assets/javascripts/modularity/modularity.coffee;TI" mtime;FI"2013-03-16T09:03:15-07:00;FI" digest;F"%996b91611131cfc7d64761aa4876248c{I" path;FI"|/Users/kevin/.rbenv/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/jquery-rails-2.2.1/vendor/assets/javascripts/jquery.js;TI" mtime;FI"2013-02-08T10:54:13-08:00;FI" digest;F"%3576d2980de0191478ec0600375acd5c{I" path;FI"™/Users/kevin/.rbenv/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/modularity-rails-0.22.1/app/assets/javascripts/modularity/tools/string_tools.coffee;TI" mtime;FI"2013-03-16T09:03:15-07:00;FI" digest;F"%f74db47507eab6d91805cba8c05d10e2I" _version;F"%ffd318ca8b794f42f5029101c2cf5d91:@compressedF