summaryrefslogtreecommitdiff
path: root/lib/observer.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/observer.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/observer.rb')
-rw-r--r--lib/observer.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/observer.rb b/lib/observer.rb
index 472a154395..ee3f01b793 100644
--- a/lib/observer.rb
+++ b/lib/observer.rb
@@ -7,7 +7,7 @@
#
# The Observer pattern, also known as Publish/Subscribe, provides a simple
# mechanism for one object to inform a set of interested third-party objects
-# when its state changes.
+# when its state changes.
#
# == Mechanism
#
@@ -39,14 +39,14 @@
# contracts are correct, nothing else can warn you.
#
# require "observer"
-#
+#
# class Ticker ### Periodically fetch a stock price.
# include Observable
-#
+#
# def initialize(symbol)
# @symbol = symbol
# end
-#
+#
# def run
# lastPrice = nil
# loop do
@@ -67,14 +67,14 @@
# 60 + rand(80)
# end
# end
-#
+#
# class Warner ### An abstract observer of Ticker objects.
# def initialize(ticker, limit)
# @limit = limit
# ticker.add_observer(self)
# end
# end
-#
+#
# class WarnLow < Warner
# def update(time, price) # callback for observer
# if price < @limit
@@ -82,7 +82,7 @@
# end
# end
# end
-#
+#
# class WarnHigh < Warner
# def update(time, price) # callback for observer
# if price > @limit