This plugin exposes two instance properties:
var MyClass = comb.define(comb.plugins.MethodMissing, {
instance : {
constructor : function(){
this._attributes = {};
},
getMissingProperty : function(name){
return this._attributes[name];
},
setMissingProperty : function(name, value){
return this._attributes[name] = value;
}
}
});
Method called to retrieve a property that is not found on the current instance of the object
Argumentsthe name of the property to retrieve.
function (name){
//return defaults
return undefined;
}
Method called to set a property that is not found on the current instance of the object
Argumentsthe name of the property to set.
the value to set the property to.
function (name,value){
//return defaults
this[name] = value;
return value;
}
MIT LICENSE
Code: git clone git://github.com/c2fo/comb-proxy.git