Sha256: 291ed9d7f797589dcb0544161566631a2632bba0ab02a5a249ddd9fa32a81e4b
Contents?: true
Size: 344 Bytes
Versions: 8
Compression:
Stored size: 344 Bytes
Contents
class Module def included_in_classes classes = [] ObjectSpace.each_object(Class) { |k| classes << k if k.included_modules.include?(self) } classes.reverse.inject([]) do |unique_classes, klass| unique_classes << klass unless unique_classes.collect { |k| k.to_s }.include?(klass.to_s) unique_classes end end end
Version data entries
8 entries across 8 versions & 1 rubygems