aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-01-17 00:53:47 +0100
committerXavier Noria <fxn@hashref.com>2010-01-17 00:53:47 +0100
commit3e94032227d450d479f511070c51f37f53d0ecc4 (patch)
treeed67a8bc446e029367748a39fa58ae295a0afa83
parent32bbd61e06d8bf241a8e4598d8dc91c42f36432f (diff)
downloadrails-3e94032227d450d479f511070c51f37f53d0ecc4.tar.gz
rails-3e94032227d450d479f511070c51f37f53d0ecc4.tar.bz2
rails-3e94032227d450d479f511070c51f37f53d0ecc4.zip
AS guide: documents Class#descendents
-rw-r--r--railties/guides/source/active_support_core_extensions.textile14
1 files changed, 12 insertions, 2 deletions
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile
index 0289121f35..f8a72db703 100644
--- a/railties/guides/source/active_support_core_extensions.textile
+++ b/railties/guides/source/active_support_core_extensions.textile
@@ -627,7 +627,17 @@ If for whatever reason an application loads the definition of a mailer class and
NOTE: Defined in +active_support/core_ext/class/delegating_attributes.rb+.
-h4. Subclasses
+h4. Descendants
+
+h5. +descendents+
+
+The +descendents+ method returns all the descendants of its receiver as an array of class objects. This method performs no filtering so non-reachable classes are included, if any.
+
+See aso +Object#subclasses_of+, explained in "Extensions to All Objects FIX THIS LINK":FIXME.
+
+NOTE: Defined in +active_support/core_ext/object/extending.rb+.
+
+h5. +subclasses+
The +subclasses+ method returns the names of all the anonymous or reachable descendants of its receiver as an array of strings:
@@ -650,7 +660,7 @@ end
M::A.subclasses # => ["N::C", "M::B2", "M::B1"]
</ruby>
-WARNING: +ActiveRecord::Base+ redefines this method, it returns class objects, reachable or not, and it is protected.
+WARNING: +ActiveRecord::Base+ redefines +subclasses+, it returns class objects, reachable or not, and it is protected.
See aso +Object#subclasses_of+, explained in "Extensions to All Objects FIX THIS LINK":FIXME.