Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
var Foo = Class.create({ initialize: function(){ console.log('initializing new Foo'); }, someMethod: function(){ console.log('someMethod on Foo'); } }); var Bar = Class.create( Foo, { initialize: function($super){ console.log('initializing new Bar'); $super(); }, someMethod: function($super){ console.log('someMethod on Bar'); $super(); } }); Bar.addMethods({ someMethod: function($super){ console.log("overridden someMethod on Bar"); $super(); } }); var f = new Foo(); f.someMethod(); var b = new Bar(); b.someMethod();
This paste will be private.
From the Design Piracy series on my blog: