Skip to content

Instantly share code, notes, and snippets.

@jae-jae
Created April 9, 2016 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jae-jae/dd8a9c84b19b47f7391880ab25525e75 to your computer and use it in GitHub Desktop.
Save jae-jae/dd8a9c84b19b47f7391880ab25525e75 to your computer and use it in GitHub Desktop.
xxxx
class A
x1:(arg)->
console.log 'x1' + arg
x2:(arg1,arg2)->
console.log 'x2' + arg1 + ":" + arg2
run:(c,arg...)->
@[c] && @[c].apply(this,arg)
c = new A()
#c.run 'x1','aaaa'
c.run 'x2','aaa','ddd'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment