Skip to content

Instantly share code, notes, and snippets.

@CatTail
Created October 23, 2013 07:09
Show Gist options
  • Select an option

  • Save CatTail/7113877 to your computer and use it in GitHub Desktop.

Select an option

Save CatTail/7113877 to your computer and use it in GitHub Desktop.
Refer to class constructor in static or instance method.
# following class have a very long class name
# and we have a factory method to create instance of this class
# using following strategy to refer to constructor in static or instance method
class first.second.third.longlonglongClassName
constructor: ->
Ctor = @
@create: ->
new Ctor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment