From: David Vallner Date: 2006-09-14T19:43:57+09:00 Subject: Re: Reflection and files MonkeeSage wrote: > How about: > > def get_class_from_file(file) > consts = Object.constants > require file > return (Object.constants - consts)[0] > end > Also doesn't work if the file was already required before. David Vallner