mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
AS guide: Object#subclasses_of also selects anonymous classes
This commit is contained in:
@@ -331,7 +331,7 @@ The method +remove_subclasses_of+ receives an arbitrary number of class objects
|
||||
|
||||
h5. +subclasses_of+
|
||||
|
||||
The method +subclasses_of+ receives an arbitrary number of class objects and returns all their reachable descendants as a single array:
|
||||
The method +subclasses_of+ receives an arbitrary number of class objects and returns all their anonymous or reachable descendants as a single array:
|
||||
|
||||
<ruby>
|
||||
class C; end
|
||||
@@ -629,7 +629,7 @@ NOTE: Defined in +active_support/core_ext/class/delegating_attributes.rb+.
|
||||
|
||||
h4. Subclasses
|
||||
|
||||
The +subclasses+ method returns the names of all the reachable descendants of its receiver as an array of strings:
|
||||
The +subclasses+ method returns the names of all the anonymous or reachable descendants of its receiver as an array of strings:
|
||||
|
||||
<ruby>
|
||||
class C; end
|
||||
|
||||
Reference in New Issue
Block a user