aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/serpentity/component.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/serpentity/component.js b/lib/serpentity/component.js
index 0204e30..0018a88 100644
--- a/lib/serpentity/component.js
+++ b/lib/serpentity/component.js
@@ -5,5 +5,17 @@
* components can be any class whatsoever.
*/
Class(Serpentity, "Component")({
+ prototype : {
+ init : function init(config) {
+ var property;
+ config = config || {};
+
+ for (property in config) {
+ if (config.hasOwnProperty(property)) {
+ this[property] = config[property];
+ }
+ }
+ }
+ }
});