class SportsDataApi::Golf::Season
Constants
- VALID_TOURS
Attributes
tour[R]
tournaments[R]
year[R]
Public Class Methods
new(season_hash)
click to toggle source
# File lib/sports_data_api/golf/season.rb, line 8 def initialize(season_hash) @year = season_hash['season']['year'] @tour = season_hash['tour']['alias'].downcase.to_sym @tournaments = season_hash.fetch('tournaments', []).map do |tournament_hash| Tournament.new(tour, year, tournament_hash) end end