Sha256: b9bc938e997f39b647906e9d6c1703e90987212330e5a68ce33c36c4b63963b3
Contents?: true
Size: 578 Bytes
Versions: 21
Compression:
Stored size: 578 Bytes
Contents
module SportsDataApi module Ncaafb class Games include Enumerable attr_reader :games, :year, :season, :week 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 def each &block @games.each do |game| if block_given? block.call game else yield game end end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems