| Module | Publisher |
| In: |
lib/utility/publisher.rb
|
Publisher is a variation on Ruby’s Observable. We do not keep track of any changed state; instead we assume that by virtue of calling publish we have changed state. We do not allow serialization of subscribers. We allow a Publisher to have multiple publications and maintain separate lists of subscribers for each one.
If this object’s changed state is true, invoke the update method in each currently associated subscriber in turn, passing it the given arguments. The changed state is then set to false.