JavaScript Binding Objects
<p>How could I do this?</p>

<p><strong>Class</strong></p>

<pre><code>var Factory = (function() {

  var Class = function() {

    this.name = 'John';

    this.methods = {
      get: function(callback) {
        callback();
      }
    };

  };

  return {
    createClass: function() {
      return new Class();
    }
  };

}());
</code></pre>

<p><strong>Usage</strong></p>

<pre><code>var MyClass = Factory.createClass();

MyClass.methods.get(function() {
   this.name // =&gt; returns undenfined
});
</code></pre>

<p>Thanks for any help!</p>
