aboutsummaryrefslogtreecommitdiffstats
path: root/lib/delegate.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
commit287a34ae0dfc23e4158f67cb7783d239f202c368 (patch)
tree5e35d5b41aae961b37cf6632f60c42f51c7aa775 /lib/delegate.rb
parent9b52ae2e6491bb5d6c59e1799449f6268baf6f89 (diff)
downloadruby-287a34ae0dfc23e4158f67cb7783d239f202c368.tar.gz
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/delegate.rb')
-rw-r--r--lib/delegate.rb36
1 files changed, 18 insertions, 18 deletions
diff --git a/lib/delegate.rb b/lib/delegate.rb
index 025e901a89..5fc0cafb4b 100644
--- a/lib/delegate.rb
+++ b/lib/delegate.rb
@@ -37,16 +37,16 @@
# def initialize
# @source = SimpleDelegator.new([])
# end
-#
+#
# def stats( records )
# @source.__setobj__(records)
-#
+#
# "Elements: #{@source.size}\n" +
# " Non-Nil: #{@source.compact.size}\n" +
# " Unique: #{@source.uniq.size}\n"
# end
# end
-#
+#
# s = Stats.new
# puts s.stats(%w{James Edward Gray II})
# puts
@@ -57,7 +57,7 @@
# Elements: 4
# Non-Nil: 4
# Unique: 4
-#
+#
# Elements: 8
# Non-Nil: 7
# Unique: 6
@@ -72,19 +72,19 @@
#
# class Tempfile < DelegateClass(File)
# # constant and class member data initialization...
-#
+#
# def initialize(basename, tmpdir=Dir::tmpdir)
# # build up file path/name in var tmpname...
-#
+#
# @tmpfile = File.open(tmpname, File::RDWR|File::CREAT|File::EXCL, 0600)
-#
+#
# # ...
-#
+#
# super(@tmpfile)
-#
+#
# # below this point, all methods of File are supported...
# end
-#
+#
# # ...
# end
#
@@ -97,15 +97,15 @@
# super # pass obj to Delegator constructor, required
# @delegate_sd_obj = obj # store obj for future use
# end
-#
+#
# def __getobj__
# @delegate_sd_obj # return object we are delegating to, required
# end
-#
+#
# def __setobj__(obj)
# @delegate_sd_obj = obj # change delegation object, a feature we're providing
# end
-#
+#
# # ...
# end
@@ -142,18 +142,18 @@ class Delegator
end
end
- #
- # Checks for a method provided by this the delegate object by fowarding the
+ #
+ # Checks for a method provided by this the delegate object by fowarding the
# call through \_\_getobj\_\_.
- #
+ #
def respond_to?(m, include_private = false)
return true if super
return self.__getobj__.respond_to?(m, include_private)
end
- #
+ #
# Returns true if two objects are considered same.
- #
+ #
def ==(obj)
return true if obj.equal?(self)
self.__getobj__ == obj