lib/sportradar/api/football/ncaafb/play.rb in sportradar-api-0.11.33 vs lib/sportradar/api/football/ncaafb/play.rb in sportradar-api-0.11.34
- old
+ new
@@ -2,9 +2,12 @@
module Api
module Football
class Ncaafb
class Play < Sportradar::Api::Football::Play
+ def yards
+ (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