10000 Fix documentation for `def_single_delegator` by vandrijevik · Pull Request #230 · ruby/ruby · GitHub
[go: up one dir, main page]

Skip to content

Fix documentation for def_single_delegator #230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/forwardable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,13 @@ def def_single_delegators(accessor, *methods)
end
end

#
# Defines a method _method_ which delegates to _obj_ (i.e. it calls
# the method of the same name in _obj_). If _new_name_ is
# Defines a method _method_ which delegates to _accessor_ (i.e. it calls
# the method of the same name in _accessor_). If _new_name_ is
# provided, it is used as the name for the delegate method.
#
# :call-seq:
# def_single_delegator(accessor, method, new_name=method)
#
def def_single_delegator(accessor, method, ali = method)
str = %{
def #{ali}(*args, &block)
Expand Down
0