How to tell if a class uses a Trait
문제
If I have a Trait that some classes use but not others, how can I test an object to see if it is an instance of a class that uses that Trait? What I want is something like isMemberOf: or isKindOf: but for Traits.
해결책
myInstance class traitCompositionIncludes: MyTraitClass
제휴하지 않습니다 StackOverflow