lib/sportradar/api/basketball/game.rb in sportradar-api-0.12.3 vs lib/sportradar/api/basketball/game.rb in sportradar-api-0.13.0

- old
+ new

@@ -202,19 +202,31 @@ 'Scheduled' elsif finished? 'Final' elsif postponed? 'Postponed' - # elsif halftime? - # 'Halftime' + elsif halftime? + 'Halftime' else clock_display end end + def halftime? + clock == '0:00' && quarter == 2 + end def clock_display if clock && period "#{clock} #{period_display}" + end + end + def period_display_long + if period > 5 + "Overtime #{period - 4}" + elsif period == 5 + 'Overtime' + else + "#{Sportradar.ordinalize_period(period)} Quarter" end end def period_display if period > 5 "#{period - 4}OT"