title: Search elements of array and return element but keep original class
body: <p>I have an array <code>my_array</code> that is made up of multiple <code>MyClass</code> objects. I need to search this array and return an object from the array, but keep the object's class as the original <code>MyClass</code>:</p>
  
  <pre><code># my_array[0] is a MyClass object
  # my_array is an Array
  </code></pre>
  
  <p><code>select</code> works perfectly, but it returns the element as an Array and not as <code>MyClass</code>. For instance:</p>
  
  <pre><code>my_array.select{|element| element[:value] == "good"}
  </code></pre>
  
  <p>returns an Array.</p>
  
  <p>I need to pass a <code>MyClass</code> object to my view, and this is all happening in the 'MyClassController`</p>
  
  <p>Thoughts?</p>