Module: Midnight::BusinessLogic::AggregateRoot

Extended by:
ActiveSupport::Concern
Defined in:
lib/midnight/business_logic/aggregate_root.rb

Defined Under Namespace

Classes: UnknownCommand

Instance Method Summary collapse

Instance Method Details

#dispatch(_command) ⇒ Object

Raises:



11
12
13
# File 'lib/midnight/business_logic/aggregate_root.rb', line 11

def dispatch(_command)
  raise UnknownCommand
end

#pending_eventsObject



19
20
21
# File 'lib/midnight/business_logic/aggregate_root.rb', line 19

def pending_events
  @pending_events ||= []
end

#stateObject



15
16
17
# File 'lib/midnight/business_logic/aggregate_root.rb', line 15

def state
  @state ||= {}
end