Sha256: d8815c6a519e5e7019c0b0c2a04a5267e975c489aa97c88acb45d1b452779f7f
Contents?: true
Size: 449 Bytes
Versions: 42
Compression:
Stored size: 449 Bytes
Contents
moduleKeywords = ['extended', 'included'] @Modules = {} class @Module @extend: (obj) -> obj = obj.prototype || obj for key, value of obj when key not in moduleKeywords @[key] = value obj.extended?.apply(@) this @include: (obj) -> obj = obj.prototype || obj for key, value of obj when key not in moduleKeywords # Assign properties to the prototype @::[key] = value obj.included?.apply(@) this
Version data entries
42 entries across 42 versions & 1 rubygems