summaryrefslogtreecommitdiff
path: root/lib/forwardable.rb
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-03 05:59:27 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-03 05:59:27 +0000
commite25d55ae08230ba7ed597f00ecac20a546aae719 ()
treedc5238ededd4cd32bc940315e7c99fee652bbb83 /lib/forwardable.rb
parentc4653fb344823712feee254097ea7fad153976e9 (diff)
* lib/forwardable.rb (SingleForwardable): Fix example in overview
by Vladimir Andrijevik [ Fixes #231] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/forwardable.rb22
1 files changed, 13 insertions, 9 deletions
@@ -196,17 +196,21 @@ end
# printer.def_delegator "STDOUT", "puts" # add delegation for STDOUT.puts()
# printer.puts "Howdy!"
#
-# Also, SingleForwardable can be use to Class or Module.
#
-# module Facade
-# extend SingleForwardable
-# def_delegator :Implementation, :service
-#
-# class Implementation
-# def service...
-# end
-# end
#
# If you want to use both Forwardable and SingleForwardable, you can
# use methods def_instance_delegator and def_single_delegator, etc.
module SingleForwardable