I have a module Foo, that it is the namespace for many classes like Foo::Bar, Foo::Baz and so on.
Foo
Foo::Bar
Foo::Baz
Is there an way to return al
If, instead of the names of the constants, you want the classes themselves, you could do it like this:
Foo.constants.map(&Foo.method(:const_get)).grep(Class)