Sha256: ff3bf4fadf88703f11baf4fece42471ee9362ad55d74a9f66a8eed5e1fffb99b
Contents?: true
Size: 806 Bytes
Versions: 2
Compression:
Stored size: 806 Bytes
Contents
require 'asir/transport/composite' module ASIR class Transport # !SLIDE # Broadcast Transport # # Broadcast to multiple Transports. class Broadcast < self include Composite def _send_message state result = first_exception = nil transports.each do | transport | begin result = transport.send_message(state.message) rescue ::Exception => exc first_exception ||= exc _handle_send_message_exception! transport, state, exc raise exc unless @continue_on_exception end end if first_exception && @reraise_first_exception raise first_exception end state.result = Result.new(state.message, result) end end # !SLIDE END end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
asir-1.2.1 | lib/asir/transport/broadcast.rb |
asir-1.2.0 | lib/asir/transport/broadcast.rb |