Skip to content

Instantly share code, notes, and snippets.

@tcr
Created July 10, 2010 16:50
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 tcr/470854 to your computer and use it in GitHub Desktop.
Save tcr/470854 to your computer and use it in GitHub Desktop.
# namespaces
NS: ->
ns: (->)
ns::dontEnum: (key) ->
ns::[key]: @[key]
delete @[key]
return new ns()
blocks: new NS()
# colors
colors: new NS()
# blocks
class blocks.Block
constructor: (color, piece) ->
@color: color
@piece: piece
blocks.dontEnum('Block')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment