title: Convert string to class name without using eval in ruby?
body: <p>I have something like this:</p>
  
  <pre><code>string = "Post"
  </code></pre>
  
  <p>I would like to convert the string to a class name literal. I use eval like this to convert the string: </p>
  
  <pre><code>eval(string) #=&gt; Post
  </code></pre>
  
  <p>Being a javaScript developer I try to avoid eval. Is there a better way of doing this in Ruby? Or is using eval the preferred way of handling this?</p>