<commit_before><commit_msg>Add a Game List model for parsing the config file<commit_after>module Saves
  class GameList
    include Enumerable

    attr_reader :games
    attr_reader :games_data

    def initialize(games_data = [])
      @games_data = games_data
    end

    def to_s
      game_names.join(', ')
    end

    def inspect
      names = game_names.map { |game_name| %{"#{game_name}"} }
      "GameList(#{names.join(', ')})"
    end

    def games
      @games ||= @games_data.map do |game_data|
        Game.new(game_data).parse
      end
    end

    alias :parse :games

    def game_names
      games.map { |game| game.name }
    end

    def self.empty
      new
    end
  end
end
{'fraction_non_alphanumeric': 0.09871244635193133, 'fraction_numerical': 0.0, 'mean_word_length': 2.30188679245283, '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': '6575285', 'n_tokens_mistral': 245, 'n_tokens_neox': 228, 'n_words': 60}