Class: EventSourcing::Command::Bus
- Inherits:
-
Concurrent::Actor::RestartingContext
- Object
- Concurrent::Actor::RestartingContext
- EventSourcing::Command::Bus
- Defined in:
- lib/event_sourcing/command/bus.rb
Instance Method Summary collapse
-
#initialize(aggregate_manager) ⇒ Bus
constructor
A new instance of Bus.
- #on_message(command) ⇒ Object
Constructor Details
#initialize(aggregate_manager) ⇒ Bus
Returns a new instance of Bus.
7 8 9 |
# File 'lib/event_sourcing/command/bus.rb', line 7 def initialize(aggregate_manager) @aggregate_manager = aggregate_manager end |
Instance Method Details
#on_message(command) ⇒ Object
11 12 13 |
# File 'lib/event_sourcing/command/bus.rb', line 11 def (command) command.execute(@aggregate_manager) end |