Sha256: e2e777c3bc02a04dfb9f2bb87acc85b282be37ee1a3e336a5c390fddcbfe1018

Contents?: true

Size: 448 Bytes

Versions: 2

Compression:

Stored size: 448 Bytes

Contents

# frozen_string_literal: true

require "ahl_scraper/fetchers/team_games/data_fetcher"

module AhlScraper
  module TeamGames
    @season_games = {}

    class << self
      def list(team_id, season_id)
        @season_games["#{team_id}-#{season_id}"] ||= DataFetcher.new(team_id, season_id).call&.map { |team_data| TeamGameListItem.new(team_data, { team_id: team_id }) }

        @season_games["#{team_id}-#{season_id}"]
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ahl_scraper-0.2.0 lib/ahl_scraper/team_games.rb
ahl_scraper-0.1.1 lib/ahl_scraper/team_games.rb