Class: Lieutenant::Config
- Inherits:
-
Object
- Object
- Lieutenant::Config
- Defined in:
- lib/lieutenant/config.rb
Overview
Manages configuration
Instance Method Summary collapse
- #aggregate_repository ⇒ Object
- #command_sender ⇒ Object
- #event_bus ⇒ Object
-
#event_store(implementation = false) ⇒ Object
:reek:BooleanParameter.
Instance Method Details
#aggregate_repository ⇒ Object
17 18 19 |
# File 'lib/lieutenant/config.rb', line 17 def aggregate_repository @aggregate_repository ||= AggregateRepository.new(event_store) end |
#command_sender ⇒ Object
21 22 23 |
# File 'lib/lieutenant/config.rb', line 21 def command_sender @command_sender ||= CommandSender.new(aggregate_repository) end |
#event_bus ⇒ Object
6 7 8 |
# File 'lib/lieutenant/config.rb', line 6 def event_bus @event_bus ||= EventBus.new end |
#event_store(implementation = false) ⇒ Object
:reek:BooleanParameter
11 12 13 14 15 |
# File 'lib/lieutenant/config.rb', line 11 def event_store(implementation = false) return @event_store_implementation = implementation if implementation @event_store_implementation ||= EventStore::InMemory @event_store ||= EventStore.new(@event_store_implementation, event_bus) end |