title: Ruby class method and instance method
body: <p>I am trying to call a method on <code>File</code>. I read the documentation of <code>File</code> and I see the class <code>method ::basename</code>. I tried the following:</p>
  
  <pre><code>x = File.new("name_of_file.ext")
  x::basename("name_of_file.ext")
  </code></pre>
  
  <p>Why can't I access the class method <code>::basename</code> in this way?</p>