Ring2: How to iterate classes in an RGEnvironment?

Viewed 49

I'm working with Ring2 in Pharo, where I have a tonel repo with some classes. I create an RGEnvironment and can see that it has a lot of "unresolved" behaviors representing the missing superclasses (not in the tonel repo, like Object). If I ask the environment for allClasses, I get also the unresolved ones, how do I get just the classes defined in the repo?

1 Answers

You want to filter the classes with a resolved name:

env := RGEnvironment new.
RGClass named: #MyClass parent: env.
env ask allClasses select: [ :each | each hasResolved: #name ]
Related