ruby-changes:31664
From: zzak <ko1@a...>
Date: Thu, 21 Nov 2013 13:44:50 +0900 (JST)
Subject: [ruby-changes:31664] zzak:r43743 (trunk): * lib/observer.rb: [DOC] Clarify default observer method.
zzak 2013-11-21 13:44:45 +0900 (Thu, 21 Nov 2013) New Revision: 43743 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43743 Log: * lib/observer.rb: [DOC] Clarify default observer method. By @edward [Fixes GH-450] https://github.com/ruby/ruby/pull/450 Modified files: trunk/ChangeLog trunk/lib/observer.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 43742) +++ ChangeLog (revision 43743) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Nov 21 13:40:20 2013 Zachary Scott <e@z...> + + * lib/observer.rb: [DOC] Clarify default observer method. + By @edward [Fixes GH-450] https://github.com/ruby/ruby/pull/450 + Thu Nov 21 13:32:53 2013 Zachary Scott <e@z...> * ext/openssl/ossl_engine.c: [DOC] Documentation for OpenSSL::Engine Index: lib/observer.rb =================================================================== --- lib/observer.rb (revision 43742) +++ lib/observer.rb (revision 43743) @@ -15,13 +15,14 @@ https://github.com/ruby/ruby/blob/trunk/lib/observer.rb#L15 # 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, -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/