diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-08-25 18:51:17 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-08-25 22:30:42 +0100 |
commit | 8ba491acc31bf08cf63a83ea0a3c314c52cd020f (patch) | |
tree | 617a8a8133b700811cca12942f802bb4c0167904 /railties/guides | |
parent | bad6803570f5f3b09d277b15c9f272bfae7408da (diff) | |
download | rails-8ba491acc31bf08cf63a83ea0a3c314c52cd020f.tar.gz rails-8ba491acc31bf08cf63a83ea0a3c314c52cd020f.tar.bz2 rails-8ba491acc31bf08cf63a83ea0a3c314c52cd020f.zip |
Revert all the stuff to do with disallowing non-public methods for Module#delegate
Diffstat (limited to 'railties/guides')
-rw-r--r-- | railties/guides/source/active_support_core_extensions.textile | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index df863935cf..b2436a2e68 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -452,30 +452,6 @@ Examples of +in?+: NOTE: Defined in +active_support/core_ext/object/inclusion.rb+. -h4. +public_send+ - -This method is available by default in Ruby 1.9, and is backported to Ruby 1.8 by Active Support. Like the regular +send+ method, +public_send+ allows you to call a method when the name is not known until runtime. However, if the method is not public then a +NoMethodError+ exception will be raised. - -<ruby> -class Greeter - def hello(who) - "Hello " + who - end - - private - - def secret - "sauce" - end -end - -greeter = Greeter.new -greeter.public_send(:hello, 'Jim') # => "Hello Jim" -greeter.public_send(:secret) # => NoMethodError -</ruby> - -NOTE: Defined in +active_support/core_ext/object/public_send.rb+. - h3. Extensions to +Module+ h4. +alias_method_chain+ |