Skip to content

Instantly share code, notes, and snippets.

@diago
Created March 13, 2010 02:23
Show Gist options
  • Save diago/331054 to your computer and use it in GitHub Desktop.
Save diago/331054 to your computer and use it in GitHub Desktop.
snipmate Class.create()
# Class
snippet pcc
var ${1:ClassName} = (
var $1 = Class.create();
$1.Version = ${2:'1.0.0'};
$1.options = {${4}};
$1.prototype = {
initialize: function(${3:arg}, options){
this.options = {};
Object.extend(this.options, $1);
Object.extend(this.options, options || {});
${5:// code}
}
};
return $1;
)();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment