lib/sportradar/api/football/nfl.rb in sportradar-api-0.11.69 vs lib/sportradar/api/football/nfl.rb in sportradar-api-0.12.0
- old
+ new
@@ -53,11 +53,11 @@
if data['games']
if data['games'].first.keys == ['game']
data['games'].map! { |hash| hash['game'] }
end
- @games_hash = create_data(@games_hash, data['games'], klass: Game, hierarchy: self, api: api)
+ create_data(@games_hash, data['games'], klass: Game, hierarchy: self, api: api)
end
self
end
@@ -101,9 +101,10 @@
def games
get_schedule if @weeks_hash.empty?
weeks.flat_map(&:games)
end
+
def teams
teams = divisions.flat_map(&:teams)
if teams.empty?
if @teams_hash.empty?
get_hierarchy
\ No newline at end of file