<commit_before>module LastResort
  class Scheduler

    def initialize
      @config = Config.new
    end

    def get_matching_schedule
      matched_schedule = @config.schedules.find do |schedule|
        match?(schedule)
      end

      if matched_schedule.nil?
        puts "No matched schedule"
        nil
      else
        puts "Schedule found -- calling #{matched_schedule[:contacts]}"
        matched_schedule
      end<commit_msg>Can now optionally inject config dependency through constructor arg<commit_after>module LastResort
  class Scheduler

    def initialize config = Config.new
      @config = config
    end

    def get_matching_schedule
      matched_schedule = @config.schedules.find do |schedule|
        match?(schedule)
      end

      if matched_schedule.nil?
        puts "No matched schedule"
        nil
      else
        puts "Schedule found -- calling #{matched_schedule[:contacts]}"
        matched_schedule
      end
{'fraction_non_alphanumeric': 0.06184486373165619, 'fraction_numerical': 0.0, 'mean_word_length': 2.435251798561151, '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': '7459315', 'n_tokens_mistral': 249, 'n_tokens_neox': 245, 'n_words': 73}