Skip to content

Instantly share code, notes, and snippets.

@syntacticsugar
Forked from lfborjas/cat.js
Created November 7, 2012 00:55
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 syntacticsugar/4028844 to your computer and use it in GitHub Desktop.
Save syntacticsugar/4028844 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment