Skip to content

Instantly share code, notes, and snippets.

@ericf
Forked from lsmith/gist:1305121
Created October 21, 2011 22:28
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 ericf/1305153 to your computer and use it in GitHub Desktop.
Save ericf/1305153 to your computer and use it in GitHub Desktop.
// For Y.Foo
// Class extensions that will be used in the base class
function ExtA() {}
...
Y.FooExtA = ExtA;
// Base Class definition
function FooBase() {}
...
Y.FooBase = Y.Base.create('foo', Y.Base, [FooBase, Y.FooExtA]);
Y.Foo = Y.Base.create('foo', Y.FooBase, []);
// Optional class extensions
function ExtB() {}
...
Y.FooExtB = ExtB;
Y.Foo = Y.Base.mix(Y.Foo, [Y.FooExtB]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment