<commit_before>class Twig
  module Options
    def set_option(key, value)
      case key
      when :branch
        if branches.include?(value)
          options[:branch] = value
        else
          abort %{The branch "#{value}" could not be found.}
        end
      when :max_days_old
        if Twig::Util.numeric?(value)
          options[:max_days_old] = value.to_f
        else
          abort %{The value `--max-days-old=#{value}` is invalid.}
        end
      when :name_only
        options[:name_only] = Regexp.new(value)
      when :name_except
        options[:name_except] = Regexp.new(value)
      end
    end

    def unset_option(key)
      if [:max_days_old, :name_except, :name_only].include?(key)
        options.delete(key)
      end
    end
  end # module Options
end<commit_msg>Allow unsetting any option<commit_after>class Twig
  module Options
    def set_option(key, value)
      case key
      when :branch
        if branches.include?(value)
          options[:branch] = value
        else
          abort %{The branch "#{value}" could not be found.}
        end
      when :max_days_old
        if Twig::Util.numeric?(value)
          options[:max_days_old] = value.to_f
        else
          abort %{The value `--max-days-old=#{value}` is invalid.}
        end
      when :name_only
        options[:name_only] = Regexp.new(value)
      when :name_except
        options[:name_except] = Regexp.new(value)
      end
    end

    def unset_option(key)
      options.delete(key)
    end
  end # module Options
end
{'fraction_non_alphanumeric': 0.10038860103626943, 'fraction_numerical': 0.0, 'mean_word_length': 2.0654761904761907, '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': '5282541', 'n_tokens_mistral': 475, 'n_tokens_neox': 481, 'n_words': 121}