title: Ruby, Array, Object - Select Object
body: <pre><code>#!/usr/local/bin/ruby
  class OReport
     attr_accessor :id, :name
     def initialize(id, name, desc)
        @id       = id
        @name     = name
        @desc     = desc
     end
  end
  
  reports = Array.new
  reports &lt;&lt; OReport.new(1, 'One', 'One Desc')
  reports &lt;&lt; OReport.new(2, 'Two', 'Two Desc')
  reports &lt;&lt; OReport.new(3, 'Three', 'Three Desc')
  </code></pre>
  
  <p>How do I now search "Reports" for 2, so that I can extract name and description from it?</p>