Skip to content

Instantly share code, notes, and snippets.

@revathskumar
Last active August 29, 2015 14:04
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 revathskumar/27cecd35b3be1e82e79f to your computer and use it in GitHub Desktop.
Save revathskumar/27cecd35b3be1e82e79f to your computer and use it in GitHub Desktop.
# Helper functions
#
# helper.js.coffee
NameSpace.Helpers =
a: () ->
console.log 'a'
b: () ->
console.log 'b'
# Modules/Classes
# users.js.coffee
class NameSpace.Users
constructor: () ->
NameSpace.a()
# ANother class
# another_class.js.cpffee
class NameSpace.AnotherClass
constructor: () ->
console.log 'constructor'
@emilsoman
Copy link

NameSpace has to be defined first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment