module AhlScraper::PlayerGames
Public Class Methods
list(player_id, season_id)
click to toggle source
# File lib/ahl_scraper/player_games.rb, line 10 def list(player_id, season_id) @season_games["#{player_id}-#{season_id}"] ||= DataFetcher.new(player_id, season_id).call&.map do |player_data| player_data[:position] == "G" ? GoalieGameListItem.new(player_data) : SkaterGameListItem.new(player_data) end @season_games["#{player_id}-#{season_id}"] end