spur-common
Version:
Common node library that is implemented through the use of spur-ioc and bluebird promises.
20 lines (15 loc) • 378 B
text/coffeescript
module.exports = ()->
class Module
constructor:()->
for module in @$modules or []
module.apply(this, arguments)
include:(module)->
for key, value of module::
@[key] = value
module.apply(this)
@include: (obj) ->
@::$modules ?= []
@::$modules.push(obj)
for key, value of obj::
@::[key] = value
@