class

ModelChannel(M)

Inherits Reference < Object

Publish updates about models to subscribers.

Constants

Log = ::Log.for(self)

Instance methods

publish(model : M)

Publishes an update about model.

Does not block.

Source
subscribe(model : M, timeout : Time::Span | Nil = nil, &)

Subscribes to updates about model.

Does not return unless the block raises Stop, raises an exception, or the channel is closed.

A timeout may be specified to ensure the block is called periodically.

Source
subscriptions

Returns the subscriptions.

Source

Nested types