提交 c85957ec 编写于 作者: R Rafael Mendonça França

Merge pull request #13092 from laurocaetano/improve_documentation_for_delegate

Improve Module#delegate documentation.
......@@ -138,6 +138,8 @@ class DelegationError < NoMethodError; end
#
# 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]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册