diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-11-29 07:11:19 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-11-29 07:11:19 -0800 |
commit | c85957ec7c247063cdc2f429c59132935ee64350 (patch) | |
tree | 527e12e708056cb7bae23cde7893b2187d862f8f | |
parent | 2be3694964b179e6fbe4b1d1d3a12def9d1a5c43 (diff) | |
parent | e40ac155cadac5162a802f3e36a66198f215417d (diff) | |
download | rails-c85957ec7c247063cdc2f429c59132935ee64350.tar.gz rails-c85957ec7c247063cdc2f429c59132935ee64350.tar.bz2 rails-c85957ec7c247063cdc2f429c59132935ee64350.zip |
Merge pull request #13092 from laurocaetano/improve_documentation_for_delegate
Improve Module#delegate documentation.
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/delegation.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/delegation.rb b/activesupport/lib/active_support/core_ext/module/delegation.rb index 182e74d9e1..58146cdf7a 100644 --- a/activesupport/lib/active_support/core_ext/module/delegation.rb +++ b/activesupport/lib/active_support/core_ext/module/delegation.rb @@ -138,6 +138,8 @@ class Module # # Foo.new("Bar").name # raises NoMethodError: undefined method `name' # + # The target method must be public, otherwise it will raise +NoMethodError+. + # def delegate(*methods) options = methods.pop unless options.is_a?(Hash) && to = options[:to] |