diff options
author | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-21 04:44:45 +0000 |
---|---|---|
committer | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-21 04:44:45 +0000 |
commit | f67be32291c437156328a3887c8448f669672c26 (patch) | |
tree | 8787a224caffb8063daa7246fb36224018acccdb /lib/observer.rb | |
parent | 1d8d8ff57f670cc5f3f6d2ccec9da372e1457301 (diff) |
* lib/observer.rb: [DOC] Clarify default observer method.
By @edward [Fixes GH-450] https://github.com/ruby/ruby/pull/450
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/observer.rb')
-rw-r--r-- | lib/observer.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/observer.rb b/lib/observer.rb index 3756794952..99610f7505 100644 --- a/lib/observer.rb +++ b/lib/observer.rb @@ -15,13 +15,14 @@ # module, which provides the methods for managing the associated observer # objects. # -# The observers must implement a method called +update+ to receive -# notifications. -# # The observable object must: # * assert that it has +#changed+ # * call +#notify_observers+ # +# An observer subscribes to updates using Observable#add_observer, which also +# specifies the method called via #notify_observers. The default method for +# #notify_observers is #update. +# # === Example # # The following example demonstrates this nicely. A +Ticker+, when run, |