class SportsDataApi::Ncaafb::Season

Attributes

type[R]
weeks[R]
year[R]

Public Class Methods

new(season_hash) click to toggle source
# File lib/sports_data_api/ncaafb/season.rb, line 6
def initialize(season_hash)
  @weeks = []
  @year = season_hash['season']
  @type = season_hash['type'].to_sym
  @weeks = season_hash['weeks'].map do |week_hash|
    Week.new(@year, @type, week_hash)
  end
end
valid?(season) click to toggle source

Check if the requested season is a valid Ncaafb season type.

The only valid types are: :REG

# File lib/sports_data_api/ncaafb/season.rb, line 20
def self.valid?(season)
  [:REG].include?(season)
end