This provides a mechanism for multiple callbacks per channel subscription (client side).
Example on the client:
function updateUiElementA(data, channel) {
...
}
function updateUiElementB(data, channel) {
...
}
PrivatePub.subscribe('/something/important', updateUiElementA);
PrivatePub.subscribe('/something/important', updateUiElementB);
To me this is useful for scenarios as described above. Where an event happens and someone might want to update multiple UI elements with somewhat complex logic.
As an aside, I have also upgraded spec and jasmine gems. I wanted to keep the entire test suite green when making changes, in doing so I found that client side specs weren't running. I had to apply a manual pattern for spec files, and while I was at it I thought it might be a good time to bring the testing dependencies to a more current version.
This provides a mechanism for multiple callbacks per channel subscription (client side).
Example on the client:
To me this is useful for scenarios as described above. Where an event happens and someone might want to update multiple UI elements with somewhat complex logic.
As an aside, I have also upgraded spec and jasmine gems. I wanted to keep the entire test suite green when making changes, in doing so I found that client side specs weren't running. I had to apply a manual pattern for spec files, and while I was at it I thought it might be a good time to bring the testing dependencies to a more current version.