Skip to content

Instantly share code, notes, and snippets.

@pchw
Created June 24, 2014 09:58
Show Gist options
  • Save pchw/bb9177f8561e6c724811 to your computer and use it in GitHub Desktop.
Save pchw/bb9177f8561e6c724811 to your computer and use it in GitHub Desktop.
class Base
class LibraryName.Klass extends Base
constructor: ->
@name = @constructor.name
@namespace = "?"
Parent = exports? and exports or @Parent = {}
class Parent.Child extends LibraryName.Klass
fn: ->
# -> Child って出したい
console.log @name
# -> Parent って出したい
console.log @namespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment