title: How to call methods of an external class in Ruby
body: <p>I have a file under <code>/lib</code> with its own method. </p>
  
  <pre><code># lib/file.rb
  class File &lt; ApplicationController
    def my_method
      ...
    end
  end
  </code></pre>
  
  <p>However I can't reach the method through the console</p>
  
  <pre><code>ruby-1.9.2-p290 :044 &gt; File.my_method
  NoMethodError: undefined method `my_method' for File:Class
  </code></pre>
  
  <p>Any idea how?</p>