title: How to check if a class already exists in Ruby
body: <p>How do I check if a class already exists in Ruby?</p>
  
  <p>My code is:</p>
  
  <pre><code>puts "enter the name of the Class to see if it exists"   
  nameofclass=gets.chomp  
  eval (" #{nameofclass}......  Not sure what to write here")
  </code></pre>
  
  <p>I was thinking of using:</p>
  
  <pre><code>eval "#{nameofclass}ancestors.     ....."
  </code></pre>