Closed jdhenke closed 10 years ago
If you're curious about implementation, here's how, given a class definition, it can be extended with certain attributes to make them available in the constructor without modifying the original definition.
class Person
@uri: "Person"
constructor: () ->
console.log @name
class Dude extends Person
Dude::name = "joe"
new Person()
new Dude()
This prints
undefined
joe
This would certainly be good as Plugins become numerous and interdependent (we should be able to produce a nice GraphView of the plugin dependencies...)
Do you know how to implement expect(@plugin2).toBeDefined()
?
That's just a jasmine syntax for saying, @plugin2
will be defined in the constructor.
// @willzeng
(we should be able to produce a nice GraphView of the plugin dependencies...)
I generated this programmatically leveraging my new infrastructure. So meta...
// @willzeng, i'd be interested in your thoughts on this
i've thought of a different way to share instances of each plugin with each other. it essentially requires classes to articulate the instance dependencies it has and assigns each instance of a plugin attributes which are the instances of the other plugins.
Example Interface
So each plugin class specifies
Reason I Like This