Last active
August 29, 2015 14:07
-
-
Save ParthBarot-BoTreeConsulting/707522d7cc9dc038ff4c to your computer and use it in GitHub Desktop.
Nested class structure using coffee script
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
class UsersProfileController | |
constructor: -> | |
return | |
assets: (params) -> | |
@a = new AssetsHandler(params) | |
@a.one() | |
@a.two() | |
return | |
class AssetsHandler | |
constructor: (@params) -> | |
one: -> | |
alert 'one -' + @params | |
two: -> | |
alert 'two -' + @params | |
u = new UsersProfileController | |
u.assets([1,2,3]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment