title: Getting “private method” in a “public function” class using CoffeeScript
body: <p>I'm doing a series of tests with classes and CoffeeScript/JavaScript. See the following code:</p>
  
  <pre><code>class Example
  
      someFunction = -&gt;
          alert @getText()
  
      constructor: -&gt;
          @text = 'Hello world! ;)'
          someFunction()
  
      getText: -&gt;
          @text
  
  
  ### Instance ###
  example = new Example
  </code></pre>
  
  <p>It's just an example, when compiling I get the error:</p>
  
  <pre><code>Uncaught TypeError: Object [object global] has no method 'getText'
  </code></pre>
  
  <p>You know how I can solve this problem?
  <a href="http://jsfiddle.net/P4Xdz/" rel="nofollow">http://jsfiddle.net/P4Xdz/</a></p>