Module: AhlScraper::TeamGames

Defined in:
lib/ahl_scraper/team_games.rb,
lib/ahl_scraper/fetchers/team_games/data_fetcher.rb

Defined Under Namespace

Classes: DataFetcher

Class Method Summary collapse

Class Method Details

.list(team_id, season_id) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/ahl_scraper/team_games.rb', line 10

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

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