]>
Commit | Line | Data |
---|---|---|
85861d67 BB |
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")({ | |
60a6915a BB |
8 | prototype : { |
9 | init : function init(config) { | |
10 | var property; | |
85861d67 | 11 | |
60a6915a BB |
12 | config = config || {}; |
13 | ||
14 | for (property in config) { | |
15 | if (config.hasOwnProperty(property)) { | |
16 | this[property] = config[property]; | |
17 | } | |
18 | } | |
19 | } | |
20 | } | |
85861d67 | 21 | }); |