title: Creating a class dynamically
body: <p>I'm trying to create a new class, without knowing the name of the class until it's supposed to be created.</p>
  <p>Something like this;</p>
  <pre><code>    variable = &quot;ValidClassName&quot;
      
          class variable
      
          end
  
  Test = ValidClassName.new
  </code></pre>
  <p>If possible, i'd also appreciate som hints on how to dynamically add attributes (and methods) to this new class.</p>
  <p>I'll be retreiving 'settings' for the class, and they will look something like this:</p>
  <pre><code>title :Person
  attribute :name, String
  attribute :age, Fixnum
  </code></pre>
  <p>But should not be designed to accept only that explicit file, the attributes might differ in number end type.</p>
  <p>Which in the end will generate a class that should look something like:</p>
  <pre><code>class Person
     def initialize(name, age)
   
         @name_out = name
         @age_out = age
     end
     
  end
  </code></pre>
  <p>Help?</p>