Class: NflData::Schedule

Inherits:
Struct
  • Object
show all
Defined in:
lib/nfl_data/schedule.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(games: []) ⇒ Schedule



3
4
5
# File 'lib/nfl_data/schedule.rb', line 3

def initialize(games: [])
  super
end

Instance Attribute Details

#gamesObject

Returns the value of attribute games



2
3
4
# File 'lib/nfl_data/schedule.rb', line 2

def games
  @games
end

Instance Method Details

#to_hObject



7
8
9
10
# File 'lib/nfl_data/schedule.rb', line 7

def to_h
  games.map!(&:to_h)
  super
end