node-sitefile
Version:
Bootstrap Express webserver for misc. resources using Sitefile
26 lines (15 loc) • 455 B
text/coffeescript
define 'sf-v0/module', [], ->
moduleKeywords = ['extended', 'included']
class Module
constructor: ->
: (obj) ->
for key, value of obj when key not in moduleKeywords
@[key] = value
obj.extended?.apply(@)
this
: (obj) ->
for key, value of obj when key not in moduleKeywords
# Assign properties to the prototype
@::[key] = value
obj.included?.apply(@)
this