Sha256: 351e2c9325b10aa367f7db17afbc481333714edf0eb144029ddfd4e03cc276b8
Contents?: true
Size: 576 Bytes
Versions: 21
Compression:
Stored size: 576 Bytes
Contents
module SportsDataApi module Ncaafb class Season attr_reader :year, :type, :weeks 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 ## # Check if the requested season is a valid # Ncaafb season type. # # The only valid types are: :REG def self.valid?(season) [:REG].include?(season) end end end end
Version data entries
21 entries across 21 versions & 1 rubygems