title: Undefined method for class / calling methods outside of a class
body: <pre><code>class Computer_create
  
    public
    def initialize(filename)
      @@files = []
      @filename = filename
    end
  
    public
    def create(filename)
      @@files &lt;&lt; filename
      puts "File: #{filename} has been created"
    end
  
    public
    def list
      return @@files
    end
  end
  
  file_1 = Computer_create.new("FileTest")
  file_1.create("FileTest")
  
  Computer_create.list
  </code></pre>
  
  <p>im just trying to make a simple sort of database which can make files, and store them in a Array, working on storing them in a hash though.
  But every time i try out my code it gives me this:</p>
  
  <p><strong>"computer_create.rb:24:in <code>&lt;top (required)&gt;': undefined method</code>list' for Computer_create:Class (NoMethodError)"</strong></p>
  
  <p>what im trying to do is: make a file called <code>FileTest</code> via <code>file_1</code>
  and then list all the files in <code>@@files</code>
  but it just doesnt seem to work.</p>