RAA - observable/0.5

observable / 0.5

Short description: Observable
Category: Library/Development
Status: beta
Created: 2003-01-14 20:14:11 GMT
Last update: 2005-07-24 18:41:20 GMT
Owner: Joel VanderWerf (Projects of this owner)
Homepage: http://redshift.sourceforge.net/observable/
Download: http://redshift.sourceforge.net/observable/
License: Ruby's
Dependency:
Required by: foxtails/0.6
Description:

A variation on the observer pattern.

Allows the state of a variable to be exposed to observers. An observer registers code to execute when the variable changes (and also a pattern to detect changes of interest). Notification happens when the writer method is called.

New in 0.5:

  • Fixed a harmless warning about an uninitialized __observer_map variable when assigning to an observable var before setting up any when clauses. Thanks to Hadmut Danisch.
  • If an observer proc takes 3 args, then the third arg is assigned the object being observed. If it takes 4 args, then the fourth is assigned the name of the attribute. This is useful if there are a lot of objects or attrs. See the examples/mem-usage-*.rb for examples and discussion. Thanks again to Hadmut.
Versions: [0.5 (2005-07-24)] [0.4 (2005-03-08)] [0.3 (2004-06-07)]

Edit this project (for project owner)

back to RAA top