title: Ruby add initialized object to class array
body: <p>I am unable to figure out or find any information on how to push the initialized object pointer to an array accessed from a class level variable. Here is an example.</p>
  
  <pre><code>Class Color
    @@colors = Array.new
  
    def initialize
     @@colors &lt;&lt; red
    end
  
    def self.list
      @@colors.each do |color|
        puts color.to_hex
      end
    end
  end
  
  red = Color.new
  </code></pre>
  
  <p>Thanks guys for your help.</p>