Class: SportsDataApi::Ncaafb::Week
- Inherits:
-
Object
- Object
- SportsDataApi::Ncaafb::Week
- Defined in:
- lib/sports_data_api/ncaafb/week.rb
Instance Attribute Summary collapse
-
#games ⇒ Object
readonly
Returns the value of attribute games.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#season ⇒ Object
readonly
Returns the value of attribute season.
-
#year ⇒ Object
readonly
Returns the value of attribute year.
Instance Method Summary collapse
-
#initialize(year, season, week_hash) ⇒ Week
constructor
A new instance of Week.
Constructor Details
#initialize(year, season, week_hash) ⇒ Week
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/sports_data_api/ncaafb/week.rb', line 6 def initialize(year, season, week_hash) @games = [] @year = year @season = season @number = week_hash['number'] @games = week_hash['games'].map do |game_hash| Game.new(@year, @season, @number, game_hash) end end |
Instance Attribute Details
#games ⇒ Object (readonly)
Returns the value of attribute games.
4 5 6 |
# File 'lib/sports_data_api/ncaafb/week.rb', line 4 def games @games end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
4 5 6 |
# File 'lib/sports_data_api/ncaafb/week.rb', line 4 def number @number end |
#season ⇒ Object (readonly)
Returns the value of attribute season.
4 5 6 |
# File 'lib/sports_data_api/ncaafb/week.rb', line 4 def season @season end |
#year ⇒ Object (readonly)
Returns the value of attribute year.
4 5 6 |
# File 'lib/sports_data_api/ncaafb/week.rb', line 4 def year @year end |