<commit_before>class EmailProcessor
  def initialize(email)
    @email = email
    # pry
  end

  def process
    newsletter = Newsletter.find_by_email(@email.to[0][:token])
    if !newsletter.nil?
      Email.create(
        newsletter_id: newsletter.id,
        to: @email.to[0][:email],
        from: @email.from[:email],
        raw_text: @email.raw_text,
        raw_html: @email.raw_html,
        raw_body: @email.raw_body,
        body: @email.body
      )
    end
  end
end
<commit_msg>Save the email receiving<commit_after>class EmailProcessor
  def initialize(email)
    # pry
    @email = email
    # pry
  end

  def process
    # pry
    newsletter = Newsletter.find_by_email(@email.to[0][:token])
    if !newsletter.nil?
    # pry
      Email.create(
        newsletter_id: newsletter.id,
        to: @email.to[0][:email],
        from: @email.from[:email],
        subject: @email.subject,
        raw_text: @email.raw_text,
        raw_html: @email.raw_html,
        raw_body: @email.raw_body,
        body: @email.body
      )
    # pry
    end
    # pry
  end
end

{'fraction_non_alphanumeric': 0.11737523105360444, 'fraction_numerical': 0.0036968576709796672, 'mean_word_length': 2.2522522522522523, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5911168', 'n_tokens_mistral': 380, 'n_tokens_neox': 375, 'n_words': 74}