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_event(type, *args, &block) ⇒ undefined
Instance Method Details
#child_entities ⇒ Set
Returns a set of symbols referring to child entities
31 32 33 |
# File 'lib/synapse/event_sourcing/member.rb', line 31 def child_entities @child_entities ||= Set.new end |
#child_entity(*fields) ⇒ undefined
Registers an instance variable as a child entity
23 24 25 26 27 |
# File 'lib/synapse/event_sourcing/member.rb', line 23 def child_entity(*fields) fields.each do |field| child_entities.add field.to_s end end |
#map_event(type, *args, &block) ⇒ undefined
40 41 42 |
# File 'lib/synapse/event_sourcing/member.rb', line 40 def map_event(type, *args, &block) event_mapper.map type, *args, &block end |