class RubyEventStore::Mappers::BatchMapper
Public Class Methods
Source
# File lib/ruby_event_store/mappers/batch_mapper.rb, line 6 def initialize(mapper = Default.new) @mapper = mapper end
Public Instance Methods
Source
# File lib/ruby_event_store/mappers/batch_mapper.rb, line 10 def events_to_records(events) events.map { |event| @mapper.event_to_record(event) } end
Source
# File lib/ruby_event_store/mappers/batch_mapper.rb, line 14 def records_to_events(records) records.map { |record| @mapper.record_to_event(record) } end