Skip to content

Instantly share code, notes, and snippets.

@arbales
Created July 22, 2010 18:49
Show Gist options
  • Select an option

  • Save arbales/486406 to your computer and use it in GitHub Desktop.

Select an option

Save arbales/486406 to your computer and use it in GitHub Desktop.
Models = require("./def");
sys = require("sys");
sys.println = function(string){
sys.print(string + "\n");
}
NodeMapper = {};
NodeMapper.Resource = {};
Models.def ("Person")({
init: function(name){
this.name = name
},
speak: function(){
return this.name;
}
}).extend{NodeMapper.Resource});
var person = new Models.Person("Austin Bales");
person.save().speak();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment