不要怂,就是干,撸起袖子干!

Commit 2b27751e by Sascha Depold

some simple methods

1 parent 26d71630
Showing with 19 additions and 0 deletions
var ModelManager = module.exports = function() {
this.models = []
}
ModelManager.prototype.addModel = function(model) {
this.models.push(model)
return model
}
ModelManager.prototype.removeModel = function(model) {
this.models = this.models.filter(function(_model) {
return _model.name != model.name
})
}
ModelManager.prototype.__defineGetter__('all', function() {
return this.models
})
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!