Sha256: 620aece7c3c8ea3355bf764770dcdb4e2b7c651ff33a4c289fc714d27dcdfa22

Contents?: true

Size: 893 Bytes

Versions: 78

Compression:

Stored size: 893 Bytes

Contents

module Sportradar
  module Api
    module Football
      class Nfl
        class Play < Sportradar::Api::Football::Play

          def play?
            @event_type.nil?
          end

          def scoring_play?
            !!@scoring_play
          end

          def down
            start_situation.down
          end

          def yfd
            start_situation.yfd
          end
          # def parse_player
          #   # TODO: Currently there is an issue where we are only mapping one player_id to a play, but there are plays with multiple players involved.
          #   play_stats = @statistics.penalty || @statistics.rush || @statistics.return || @statistics.receive
          #   if play_stats.is_a?(Array)
          #     play_stats = play_stats.first
          #   end
          #   @player_id = play_stats&.player&.id
          # end

        end
      end
    end
  end
end

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
sportradar-api-0.20.2 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.20.1 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.20.0 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.20.0.pre2 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.20.0.pre lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.19.6 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.19.5 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.19.4 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.19.3 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.19.2 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.19.1 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.19.0 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.18.1 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.18.0 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.17.6 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.17.5 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.17.5.pre lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.17.4 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.17.3 lib/sportradar/api/football/nfl/play.rb
sportradar-api-0.17.2 lib/sportradar/api/football/nfl/play.rb