spincycle
Version:
A reactive message router and object manager that lets clients subscribe to object property changes on the server
81 lines (67 loc) • 2.16 kB
JavaScript
// Generated by CoffeeScript 1.9.3
(function() {
var SpinFunction, SuperModel, all, defer,
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = 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; },
hasProp = {}.hasOwnProperty;
SuperModel = require('./SuperModel');
defer = require('node-promise').defer;
all = require('node-promise').allOrNone;
SpinFunction = (function(superClass) {
extend(SpinFunction, superClass);
SpinFunction.type = 'SpinFunction';
SpinFunction.model = [
{
name: 'name',
"public": true,
value: 'name',
"default": 'Spin Function'
}, {
name: 'comment',
"public": true,
value: 'comment',
"default": ' '
}, {
name: 'code',
"public": true,
value: 'code',
"default": ' ',
code: true
}, {
name: 'testdata',
"public": true,
value: 'testdata',
"default": '{}',
code: true
}, {
name: 'testfunction',
"public": true,
value: 'testfunction',
"default": 'var testdata = this.testdata;this.codefunc(testdata);',
code: true
}, {
name: 'testassertion',
"public": true,
value: 'testassertion',
"default": 'return arg.value == 1;',
code: true
}, {
name: 'version',
"public": true,
value: 'version',
"default": '0.0'
}
];
function SpinFunction(record) {
this.record = record;
this.postCreate = bind(this.postCreate, this);
return SpinFunction.__super__.constructor.apply(this, arguments);
}
SpinFunction.prototype.postCreate = function(q) {
return q.resolve(this);
};
return SpinFunction;
})(SuperModel);
module.exports = SpinFunction;
}).call(this);
//# sourceMappingURL=SpinFunction.js.map