class SportsDataApi::Ncaafb::Games

Attributes

games[R]
season[R]
week[R]
year[R]

Public Class Methods

new(year, season, week, games_hash) click to toggle source
# File lib/sports_data_api/ncaafb/games.rb, line 7
def initialize(year, season, week, games_hash)
  @year = year
  @season = season
  @week = week

  @games = games_hash['games'].map do |game_hash|
    Game.new(@year, @season, @week, game_hash)
  end
end

Public Instance Methods

each() { |game| ... } click to toggle source
# File lib/sports_data_api/ncaafb/games.rb, line 17
def each &block
  @games.each do |game|
    if block_given?
      block.call game
    else
      yield game
    end
  end
end