* lib/forwardable.rb: support 'delegate :foo => :bar' for to meet
by specification of RDOC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1111afbe5a
commit
fcd7300bf2
@ -1,3 +1,8 @@
|
||||
Wed May 11 19:45:27 2011 Keiju Ishitsuka <keiju@ishitsuka.com>
|
||||
|
||||
* lib/forwardable.rb: support 'delegate :foo => :bar' for to meet
|
||||
by specification of RDOC.
|
||||
|
||||
Wed May 11 08:36:38 2011 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* lib/webrick: Add documentation for WEBrick::HTTPAuth
|
||||
|
@ -149,7 +149,7 @@ module Forwardable
|
||||
#
|
||||
def instance_delegate(hash)
|
||||
hash.each{ |methods, accessor|
|
||||
methods = methods.to_s unless methods.respond_to?(:each)
|
||||
methods = [methods] unless methods.respond_to?(:each)
|
||||
methods.each{ |method|
|
||||
def_instance_delegator(accessor, method)
|
||||
}
|
||||
@ -214,7 +214,7 @@ module SingleForwardable
|
||||
#
|
||||
def single_delegate(hash)
|
||||
hash.each{ |methods, accessor|
|
||||
methods = methods.to_s unless methods.respond_to?(:each)
|
||||
methods = [methods] unless methods.respond_to?(:each)
|
||||
methods.each{ |method|
|
||||
def_single_delegator(accessor, method)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user