lib/sportradar/api/football/play_statistics.rb in sportradar-api-0.11.48 vs lib/sportradar/api/football/play_statistics.rb in sportradar-api-0.11.49

- old
+ new

@@ -171,10 +171,14 @@ @nullified = data['nullified'] @team = OpenStruct.new(data['team']) if data['team'] @player = OpenStruct.new(data['player']) if data['player'] end + def made? + @missed == 0 && !nullified? + end + def nullified? @nullified.to_s == 'true' end end @@ -210,10 +214,14 @@ @team = OpenStruct.new(data['team']) if data['team'] @player = OpenStruct.new(data['player']) if data['player'] @nullified = data['nullified'] end + def touchdown? + @touchdown == 1 && !nullified? + end + def nullified? @nullified.to_s == 'true' end end @@ -310,9 +318,13 @@ @yards = data['yards'] || data['yds'] @team = OpenStruct.new(data['team']) if data['team'] @player = OpenStruct.new(data['player']) if data['player'] @nullified = data['nullified'] + end + + def touchdown? + @touchdown == 1 && !nullified? end def nullified? @nullified.to_s == 'true' end \ No newline at end of file