Last active
March 10, 2017 10:33
-
-
Save Spartan322/610e89019088ba0652b38d46a9480dce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function::get = (props) -> | |
@::__defineGetter__ name, func for name, func of props | |
Function::set = (props) -> | |
@::__defineSetter__ name, func for name, func of props | |
Function::Symbol = (props) -> | |
@::[Symbol[name]] = func for name, func of props | |
Function::static = | |
property: (prop, val) -> @[prop] = val | |
Symbol: (props) -> @[Symbol[name]] = func for name, func of props | |
get: (props) -> @__defineGetter__ name, func for name, func of props | |
set: (props) -> @__defineSetter__ name, func for name, func of props | |
Function::static.get.Symbol = (props)-> | |
@__defineGetter__ Symbol[name], func for name, func of props | |
Function::get.Symbol = (props)-> | |
@::__defineGetter__ Symbol[name], func for name, func of props | |
Function::property = (prop, val) -> @::[prop] = val |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment