Sha256: 624fadf282b3fa01ef1395264f9603fb0b9f49057324c0b87b01251d5163ace3

Contents?: true

Size: 230 Bytes

Versions: 127

Compression:

Stored size: 230 Bytes

Contents

class Class
  def subclasses
    result = []
    ObjectSpace.each_object(Class) do |k|
      next unless k < self
      next if k.respond_to?(:singleton_class?) && k.singleton_class?
      result << k
    end
    result
  end
end

Version data entries

127 entries across 127 versions & 1 rubygems

Version Path
specinfra-2.91.0 lib/specinfra/ext/class.rb
specinfra-2.90.1 lib/specinfra/ext/class.rb
specinfra-2.90.0 lib/specinfra/ext/class.rb
specinfra-2.89.0 lib/specinfra/ext/class.rb
specinfra-2.88.2 lib/specinfra/ext/class.rb
specinfra-2.88.1 lib/specinfra/ext/class.rb
specinfra-2.88.0 lib/specinfra/ext/class.rb
specinfra-2.87.2 lib/specinfra/ext/class.rb
specinfra-2.87.1 lib/specinfra/ext/class.rb
specinfra-2.87.0 lib/specinfra/ext/class.rb
specinfra-2.86.0 lib/specinfra/ext/class.rb
specinfra-2.85.1 lib/specinfra/ext/class.rb
specinfra-2.85.0 lib/specinfra/ext/class.rb
specinfra-2.84.1 lib/specinfra/ext/class.rb
specinfra-2.84.0 lib/specinfra/ext/class.rb
specinfra-2.83.4 lib/specinfra/ext/class.rb
specinfra-2.83.3 lib/specinfra/ext/class.rb
specinfra-2.83.2 lib/specinfra/ext/class.rb
specinfra-2.83.1 lib/specinfra/ext/class.rb
specinfra-2.83.0 lib/specinfra/ext/class.rb