Skip to content

Instantly share code, notes, and snippets.

@leosoto
Created July 19, 2012 10:10
Show Gist options
  • Save leosoto/3142855 to your computer and use it in GitHub Desktop.
Save leosoto/3142855 to your computer and use it in GitHub Desktop.
Object.prototype.new = (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) ->
new this(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
class Point
constructor: (@x, @y) ->
toString: -> "(#{@x}, #{@y})"
alert String.new("hello")
alert Point.new(10, 10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment