]> git.r.bdr.sh - rbdr/serpentity/blob - lib/serpentity/component.js
0018a880413a7b8c6f02272bbb6081a0ca032971
[rbdr/serpentity] / lib / serpentity / component.js
1 /*
2 * Components store data. Nothing to say here really, just
3 * inherit and add a prototype, or don't even inherit, see?
4 * It's just an empty class, so what I'm trying to say is your
5 * components can be any class whatsoever.
6 */
7 Class(Serpentity, "Component")({
8 prototype : {
9 init : function init(config) {
10 var property;
11
12 config = config || {};
13
14 for (property in config) {
15 if (config.hasOwnProperty(property)) {
16 this[property] = config[property];
17 }
18 }
19 }
20 }
21 });