Skip to content

Instantly share code, notes, and snippets.

@lfborjas
Created November 1, 2012 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lfborjas/3996869 to your computer and use it in GitHub Desktop.
Save lfborjas/3996869 to your computer and use it in GitHub Desktop.
kittehs
sys = require("child_process");
var Cat = function( name ){
this.name = name;
};
Cat.prototype.meow = function(){
sys.exec('say "' + this.name + ' says MEEEEOOOOOOOOOWOWOWOW"');
};
module.exports = Cat;
> Kitteh = require("./cat");
[Function]
> myKitteh = new Kitteh("floppy");
{ name: 'floppy' }
> myKitteh.meow()
undefined
@syntacticsugar
Copy link

yeahhhhhhhhhhhhhhhhh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment