From: Logan Capaldo Date: 2006-01-15T08:12:26+09:00 Subject: Re: Newbie regex question about \w On Jan 14, 2006, at 5:49 PM, Simon Kr�ger wrote: > > [...] >> especially with heredocs and such. I would take a look at rdoc >> and see if you can't manipulate it to get a list of classes for you. > > Maybe this is about regexps and i'm totaly off, but what about: > > --------------------------------------------- > before = Object.constants > require 'sqlite3' # put your file here > after = Object.constants > > p(after - before) > --------------------------------------------- > > output: > > ["NKF", "Deprecated", "SQLite3", "Base64", "Kconv", "ParseDate"] > > > cheers > > Simon > Clever! before = Object.constants require 'file' after = Object.constants files_classes = (after - before).select { |x| Class === Object.const_get(x) }