Module pattern | Private access to passed in reference
<p>Suppose I have someFunction() that has a public prototype function giveMeAccess() available to the user.  </p>

<p>Now suppose I want this prototype method to have access to Private variables inside the function that returned it..</p>

<p>Is there any way to do this?</p>

<p>Yes this has an application as strange as it might seem.  I need this info. to model a class hierarchy.</p>

<pre><code>var privateMaker = function ( give_me_access ) {

    var Private = {},
        someFunction = function(){};

    someFunction.prototype = {
        public_access: give_me_access
    };

    return someFunction;
}
</code></pre>

<p><strong>Use</strong></p>

<pre><code>var Func1 = new privateMaker();
var private_loot = Func1.public_access();
</code></pre>

<p><strong>Question</strong></p>

<p>How do I give giveMeAccess() access to Private inside of privateMaker()? </p>

<p>Note the prototype function is passed in to the outer function instead of defined in the function as usual.  This is the weird caveat.</p>

<p>If this is impossible with this model...then state that as an answer.</p>
