Sha256: 68c0e2faa2063757944fbed7275219bdef394e3927b34261923be47deab69ba8
Contents?: true
Size: 691 Bytes
Versions: 7
Compression:
Stored size: 691 Bytes
Contents
moduleKeywords = ['extended', 'included', 'initialize'] class Lanes.lib.ModuleSupport @includeInto: (klass)-> _.extend(klass,this) @include: (obj) -> special = this::extended_properties || [] if obj.initialize fn = @::initialize @::initialize = -> obj.initialize.apply(this, arguments) fn?.apply(this,arguments) for key, value of obj when key not in moduleKeywords # Assign properties to the prototype if key in special && @::[key] _.extend(@::[key], value) else @::[key] = value obj.included?.apply(@) this
Version data entries
7 entries across 7 versions & 1 rubygems