title: Check if rpm is installed with ruby script
body: <p>I'm trying to rewrite some bash scripts and one of the sections checks if certain rpm's are installed on the system with a basic if statement</p>
  
  <pre><code>if rpm -qa | grep rpmnamehere; then
       do stuff
  </code></pre>
  
  <p>I want to do something similar in ruby, but am pretty new to this and not sure where to look in the documentation.</p>
  
  <p>Thanks</p>