Module: Lieutenant::Event

Defined in:
lib/lieutenant/event.rb

Overview

The basic interface to register the aggregates events

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#aggregate_idObject (readonly)

Returns the value of attribute aggregate_id.



12
13
14
# File 'lib/lieutenant/event.rb', line 12

def aggregate_id
  @aggregate_id
end

#sequence_numberObject (readonly)

Returns the value of attribute sequence_number.



12
13
14
# File 'lib/lieutenant/event.rb', line 12

def sequence_number
  @sequence_number
end

Class Method Details

.included(base) ⇒ Object



6
7
8
9
10
# File 'lib/lieutenant/event.rb', line 6

def self.included(base)
  base.instance_eval do
    include Lieutenant::Message
  end
end

Instance Method Details

#prepare(aggregate_id, sequence_number) ⇒ Object



14
15
16
17
# File 'lib/lieutenant/event.rb', line 14

def prepare(aggregate_id, sequence_number)
  @aggregate_id = aggregate_id
  @sequence_number = sequence_number
end