lattice-core v0.11 Release Notes
-
๐ Changes
- Added a
RingBuffer(T)
to keep a fixed number of items in an object. For example, a chat_room might keep the last 100 ChatMessages. It could do this withmessages = RingBuffer(ChatMessage).new(max_items: 100).
, Items are available in first-in, first-out in#values
- ๐ Changed behavior of
WebObject#dom_id
to create a more reliable id that can be extended more easily when searching for objects. The key piece is provided by#signature
. - Added
WebObject#observer
andWebObject#add_observer
to allow messaging between WebObjects. Observers are added to an object by calling#add_observer
with the observing object. Any events that occur in the observered object are sent to theobserver#on_event
with a ConnectedMessage. - โ Added
Connected::EventObserver
which has a RingBuffer for events received.
- Added a