Skip to content

Instantly share code, notes, and snippets.

@canonic-epicure
Created February 10, 2010 16:30
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 canonic-epicure/300508 to your computer and use it in GitHub Desktop.
Save canonic-epicure/300508 to your computer and use it in GitHub Desktop.
Role('JooseX.Class.Triggered', {
stem : {
have : {
attributesMC : Class({
isa : Joose.Managed.StemElement.Attributes,
propertyMetaClass : Class({
isa : Joose.Managed.Attribute,
does : JooseX.Attribute.Trigger
})
})
}
}
})
Class('BaseClass', {
trait : JooseX.Class.Triggered,
has : {
attr : {
trigger : function () {}
}
}
})
Class('SuperClass', {
isa : BaseClass //no need for trait here - metaclasses are inherited by default
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment