Either of the two is fine. This is in a Rails environment where I want
to
find all classes using one of the two rules above. The problem is that
the
classes I want to find probably aren’t “required” at the time of
searching
(ie ObjectSpace#each_object doesn’t find them as far as I can tell and
Module#included hasn’t been triggered).
Is it possible to do this?
Best regards,
Marcus
Tried this (doesn’t work):
class_names = Array.new
ObjectSpace.each_object { |obj| class_names << obj.name if
Thanks for the answer. Unfortunately this won’t work as I explained in
my
previous mail. The classes aren’t required yet, only on the load path
(and
are auto-required by Rails when needed as I understand it), so I need to
find them there somehow.
/Marcus
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.