Sha256: 12b6962d25d7ad95638940725c75e8345848a412c8535d63a192b3b824ec72dc
Contents?: true
Size: 449 Bytes
Versions: 13
Compression:
Stored size: 449 Bytes
Contents
module SportsDataApi module Golf class Season VALID_TOURS = %i(pga euro).freeze attr_reader :year, :tour, :tournaments def initialize(season_hash) @year = season_hash['season']['year'] @tour = season_hash['tour']['alias'].downcase.to_sym @tournaments = season_hash['tournaments'].map do |tournament_hash| Tournament.new(tour, year, tournament_hash) end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems