lib/sportradar/api/football/ncaafb/play.rb in sportradar-api-0.11.46 vs lib/sportradar/api/football/ncaafb/play.rb in sportradar-api-0.11.47

- old
+ new

@@ -5,10 +5,12 @@ class Play < Sportradar::Api::Football::Play def play_type if @play_type.nil? nil + elsif self.timeout? + 'timeout' elsif @play_type.casecmp? 'kick' 'kickoff' elsif @play_type.casecmp? 'extrapoint' 'extra point' elsif @play_type.casecmp? 'fieldgoal' @@ -31,9 +33,17 @@ (counted_play? && (statistics.pass&.first || statistics.rush&.first)&.yards).to_i end def counted_play? ['rush', 'pass'].include?(self.play_type) && !self.description.include?('No Play') + end + + def play? + @event_type.nil? + end + + def event? + !play? end def halftime? @description == "End of 1st Half" end