class Sequent::Util::DryRun::RecordingEventPublisher
Records which Projector’s and Workflow’s are executed
Attributes
Public Class Methods
Source
# File lib/sequent/util/dry_run.rb, line 69 def initialize(result) super() @result = result end
Calls superclass method
Public Instance Methods
Source
# File lib/sequent/util/dry_run.rb, line 74 def process_event(event) [*Sequent::Core::Workflow.descendants, *Sequent::Core::Projector.descendants].each do |handler_class| next unless handler_class.handles_message?(event) if handler_class < Sequent::Workflow @result.invoked_workflow(EventInvokedHandler.new(event, handler_class)) elsif handler_class < Sequent::Projector @result.invoked_projector(EventInvokedHandler.new(event, handler_class)) else fail "Unrecognized event_handler #{handler_class} called for event #{event.class}" end rescue StandardError raise PublishEventError.new(handler_class, event) end end