Skip to content

Instantly share code, notes, and snippets.

@frekw
Created April 14, 2010 12:44
Show Gist options
  • Save frekw/365769 to your computer and use it in GitHub Desktop.
Save frekw/365769 to your computer and use it in GitHub Desktop.
class Foo {
config: {
debug: false,
var2: "foo",
limit: 5
}
initialize: function(config){
this.config.extend(config);
},
doSomething: function(){
if(config.debug){
for(var i = 0; i < config.limit; i++) echo(config.var2);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment