Skip to content

Instantly share code, notes, and snippets.

@bmeck
Created November 7, 2011 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmeck/1345731 to your computer and use it in GitHub Desktop.
Save bmeck/1345731 to your computer and use it in GitHub Desktop.
resourceful=require('./');
X=resourceful.define({
name:'XXX',
properties:{
z:{
type:'number',
get:function(val){
console.log('get','this',this,'val',val);
return this._properties.z;
},
set:function(val){
console.error('set','this',this,'val',val);
this._properties.z = 2;
}
}
}
});
a=new X({z:1})
console.error(a)
a._properties.z = 1;
console.error(a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment