<commit_before>module ICIMS
  class Sync

    def call
      JobOffer.update_all(approved: false)
      icims_records.each do |icims_record|
        job_offer = JobOffer.where(icims_id: icims_record.id).first_or_initialize
        parsed_icims_record = JobOfferParser.new(icims_record)
        %w(title category locations hire_type description approved).each do |attribute|
          job_offer.send("#{attribute}=", parsed_icims_record.send(attribute))
        end
        job_offer.save! if job_offer.valid?
      end
    end

    private
<commit_msg>Fixes Sync to use JobParser<commit_after>module ICIMS
  class Sync

    def call
      JobOffer.update_all(approved: false)
      icims_records.each do |icims_record|
        job_offer = JobOffer.where(icims_id: icims_record.id).first_or_initialize
        parsed_icims_record = JobParser.new(icims_record)
        %w(title category locations hire_type description approved).each do |attribute|
          job_offer.send("#{attribute}=", parsed_icims_record.send(attribute))
        end
        job_offer.save! if job_offer.valid?
      end
    end

    private

{'fraction_non_alphanumeric': 0.07906558849955077, 'fraction_numerical': 0.0, 'mean_word_length': 3.2037735849056603, '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': '2593970', 'n_tokens_mistral': 360, 'n_tokens_neox': 349, 'n_words': 70}