philschatz/octokit.js — pull request #60 by cirosantilli (2014-06-23 19:26:29+00:00)
Title: [WIP][refactor] Attach methods to prototype instead of object.

Doing:

- `@func = ->` inside of the constructor attaches methods to objects, which uses extra memory if there are multiple objects

- `func: ->` attaches to `.prototype`, so one per class.

Since it is more efficient, it is also more common, and therefore easier to identify the instance methods.

Also requires using `@user` instead of `_user` closure variable, which is good as it makes it clear what is an instance variable and what is a local one.

If good I will do this for every class.

Only the 2 currently failing tests fail like before this PR.