<commit_before>module RubyEventStore
  module Mappers
    class DomainEventProtoMapper
      def dump(domain_event)
        TransformationItem.new(
          event_id:   domain_event.event_id,
          metadata:   domain_event.metadata,
          data:       domain_event.data,
          event_type: domain_event.type
        )
      rescue NoMethodError
        raise ProtobufEncodingFailed
      end

      def load(item)
        Proto.new(
          event_id: item.event_id,
          data:     item.data,
          metadata: item.metadata
        )
      end
    end
  end
end<commit_msg>Simplify DomainEventProtoMapper code<commit_after>module RubyEventStore
  module Mappers
    class DomainEventProtoMapper < DomainEventMapper
      def load(item)
        Proto.new(
          event_id: item.event_id,
          data:     item.data,
          metadata: item.metadata
        )
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.0537280701754386, 'fraction_numerical': 0.0, 'mean_word_length': 1.9076433121019107, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2563637', 'n_tokens_mistral': 262, 'n_tokens_neox': 254, 'n_words': 56}