Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- moduleKeywords =['extended,included']
- class module
- @extend: (obj) ->
- for key, value of obj when key not in moduleKeywords
- @[key] = value
- obj.extended?.apply(@)
- this
- @include: (obj) ->
- for key, value of obj when key not in moduleKeywords
- @::[key] = value
- obj.included?.apply(@)
- this
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement