Has a Module been defined?

Hi,

how can I check whether a Module/Class with a given
name has already been defined?

regards
Hadmut

Hadmut Danisch wrote:

Hi,

how can I check whether a Module/Class with a given
name has already been defined?

Here is my first thought. There might be a problem with it,
but it works on my simple tests.

if defined?(Foo) && Foo.is_a?(Module)

Hal