title: Ruby Class Method with Each Method : newbie learning through Bloc
body: <p>I am currently a student through Bloc, and am struggling with Class Methods.  I am working through the lesson on the Each Method.  The first part of the instructions are: </p>
  
  <blockquote>
    <p>Let's mix this new each trick with some of the <code>Class</code> concepts we've been practicing. Create an <code>ArrayModifier</code> class. It should take an array as an argument to its <code>initialize</code> function, and have one instance method:</p>
    
    <ul>
    <li><code>exclaim</code> -- Loops through the array and returns a new array of each element with an exclamation mark added.</li>
    </ul>
  </blockquote>
  
  <p>Here is what I am coming up with so far, but I have no idea what I am doing wrong.  I particularly do not understand initialize and how to use it properly.</p>
  
  <pre><code>class ArrayModifier
  
    attr_accessor :array
  
    def initialize(array)
      @array = array
    end
  
    def exclaim
      @array.each do |i|
        puts i + "!"
      end
      @array
    end
  
  end
  </code></pre>