APIdock / Ruby on Rails
/
Browse About
method

subclasses

v2.3.8 - Show latest stable - Class: Class
subclasses()
public

Returns an array with the names of the subclasses of self as strings.

  Integer.subclasses # => ["Bignum", "Fixnum"]
# File activesupport/lib/active_support/core_ext/class/removal.rb, line 15
  def subclasses
    Object.subclasses_of(self).map { |o| o.to_s }
  end

Related methods

  • Instance methods
  • cattr_accessor
  • cattr_reader
  • cattr_writer
  • class_inheritable_accessor
  • class_inheritable_array
  • class_inheritable_array_writer
  • class_inheritable_hash
  • class_inheritable_hash_writer
  • class_inheritable_reader
  • class_inheritable_writer
  • duplicable?
  • inheritable_attributes
  • read_inheritable_attribute
  • remove_class
  • remove_subclasses
  • reset_inheritable_attributes
  • subclasses
  • superclass_delegating_accessor
  • superclass_delegating_reader
  • superclass_delegating_writer
  • write_inheritable_array
  • write_inheritable_attribute
  • write_inheritable_hash
  • Private methods
  • privateinherited
  • privateinherited_with_inheritable_attributes
APIdock API Documentation Browser

© 2026 APIdock