>>>>> "S" == Steve Hill <stephen.hill / motorola.com> writes:

S> OK, so this is all well and good. But what happens now if I have a
S> string containing the name of the class I want to create from the
S> factory (the context of my question is parsing a meta file).

 Well, you have #eval to do this but it can be dangerous if you don't trust
the content of the meta file.

 You can retrieve a constant from its name with #const_get, for example

  Object.const_get("Array")

 More generally

   klass, name = Object, "File::Stat"
   name.split(/::/).each do |i| 
      klass = klass.const_get(i) 
   end
   p klass
  

Guy Decoux