title: Ruby condition for inserting unique items into an array
body: <p>I know that if you have an <code>array</code> and reference it as <code>array.uniq</code> it will return without any of the duplicates. </p>
  
  <p>However in this case it is an array of objects (is that proper ruby speak?). I want each call to go into the <code>@calls</code> array unless the <code>call.from</code> is the same as a call_formatted object already present in the array.</p>
  
  <p>How can I conditionally place these objects in the array if no other objects in the array have the same <code>call.from</code> value?</p>
  
  <pre><code>calls_raw.each do |call|       
          call_formatted = {
                :date =&gt; date,
                :time =&gt; time,
                :from =&gt; call.from,
                :duration =&gt; call.duration,
                :recording =&gt; recording,
          }
          @calls &lt;&lt; call_formatted
  end
  </code></pre>