diff options
author | Xavier Noria <fxn@hashref.com> | 2010-01-18 23:32:17 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-01-18 23:32:17 +0100 |
commit | 907754d7ee74c4f6f94c2457bd46e116bc82acbd (patch) | |
tree | 6b2820c4b22fef3e7719f0711099304c2ef104fa | |
parent | cf82ddc96a867e63edc60e5813070a8f7b58fc14 (diff) | |
download | rails-907754d7ee74c4f6f94c2457bd46e116bc82acbd.tar.gz rails-907754d7ee74c4f6f94c2457bd46e116bc82acbd.tar.bz2 rails-907754d7ee74c4f6f94c2457bd46e116bc82acbd.zip |
AS guide: documents Object#extend_with_included_modules_from
-rw-r--r-- | railties/guides/source/active_support_core_extensions.textile | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index b3c157208c..2a548ac5c2 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -388,6 +388,27 @@ C.extended_by # => [N, N2, M] NOTE: Defined in +active_support/core_ext/object/extending.rb+. +h5. +extend_with_included_modules_from+ + +The method +extend_with_included_modules_from+ extends its receiver with the modules that extend its argument: + +<ruby> +module M +end + +class C + extend M +end + +class D +end + +D.extend_with_included_modules_from(C) +D.extended_by # => [M] +</ruby> + +NOTE: Defined in +active_support/core_ext/object/extending.rb+. + h4. Instance Variables Active Support provides several methods to ease access to instance variables. |