Module: Synapse::EventSourcing::Member::ClassMethods
- Defined in:
- lib/synapse/event_sourcing/member.rb
Instance Method Summary collapse
-
#child_entities ⇒ Set
Returns a set of symbols referring to child entities.
-
#child_entity(*fields) ⇒ undefined
Registers an instance variable as a child entity.
- #map_command(type, *args, &block) ⇒ undefined
- #map_event(type, *args, &block) ⇒ undefined
Instance Method Details
#child_entities ⇒ Set
Returns a set of symbols referring to child entities
32 33 34 |
# File 'lib/synapse/event_sourcing/member.rb', line 32 def child_entities @child_entities ||= Set.new end |
#child_entity(*fields) ⇒ undefined
Registers an instance variable as a child entity
24 25 26 27 28 |
# File 'lib/synapse/event_sourcing/member.rb', line 24 def child_entity(*fields) fields.each do |field| child_entities.add field.to_s end end |
#map_command(type, *args, &block) ⇒ undefined
41 42 43 |
# File 'lib/synapse/event_sourcing/member.rb', line 41 def map_command(type, *args, &block) commnad_mapper.map type, *args, &block end |
#map_event(type, *args, &block) ⇒ undefined
50 51 52 |
# File 'lib/synapse/event_sourcing/member.rb', line 50 def map_event(type, *args, &block) event_mapper.map type, *args, &block end |