Class: AggregateRoot::DefaultApplyStrategy
- Inherits:
-
Object
- Object
- AggregateRoot::DefaultApplyStrategy
- Defined in:
- lib/aggregate_root/default_apply_strategy.rb
Instance Method Summary collapse
- #call(aggregate, event) ⇒ Object
-
#initialize(strict: true) ⇒ DefaultApplyStrategy
constructor
A new instance of DefaultApplyStrategy.
Constructor Details
#initialize(strict: true) ⇒ DefaultApplyStrategy
Returns a new instance of DefaultApplyStrategy.
8 9 10 |
# File 'lib/aggregate_root/default_apply_strategy.rb', line 8 def initialize(strict: true) @strict = strict end |
Instance Method Details
#call(aggregate, event) ⇒ Object
12 13 14 |
# File 'lib/aggregate_root/default_apply_strategy.rb', line 12 def call(aggregate, event) on_handler(aggregate, event.event_type)[event] end |