minor tweak...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2015-12-08 08:27:44 +03:00
parent 5e1b6d43ae
commit fe2f6ec4d7
2 changed files with 17 additions and 1 deletions

View File

@ -743,9 +743,17 @@ module.MetaActions = {
return this.mixout.call(to, this, all, descriptors, all_attr_types)
},
// Create a child object...
//
// NOTE: this will create a .config in the instance that inherits from
// this.config...
// NOTE: this will not copy/clone any data.
//
// XXX is this correct???
clone: function(){
return Object.create(this)
var o = Object.create(this)
o.config = Object.create(this.config)
return o
},
}

View File

@ -332,6 +332,14 @@ module.QueueActions = actions.Actions({
delete this.__failed
delete this.__done
}],
// This will create a .config in instances...
__init__: function(){
if(this.__proto__.config && !Object.hasOwnProperty(this, 'config')){
this.config = Object.create(this.__proto__.config)
}
}
})