Sha256: 985b59fd8abdd09950e10ee347d7f5ef773ad6d9303c88566875d3df5ce79d11

Contents?: true

Size: 1.26 KB

Versions: 128

Compression:

Stored size: 1.26 KB

Contents

module Sportradar
  module Api
    class Football::StatPack::Fumbles < Football::StatPack
      attr_accessor :response, :fumbles, :lost_fumbles, :own_rec, :own_rec_yards, :opp_rec, :opp_rec_yards, :out_of_bounds, :forced_fumbles, :own_rec_tds, :opp_rec_tds, :ez_rec_tds

      def set_stats
        @response       = response[1] if response.is_a? Array
        @fumbles        = response["fumbles"] || response['fum']
        @lost_fumbles   = response["lost_fumbles"] || response['lost']
        @own_rec        = response["own_rec"]
        @own_rec_yards  = response["own_rec_yards"] || response["own_rec_yds"]
        @opp_rec        = response["opp_rec"]
        @opp_rec_yards  = response["opp_rec_yards"] || response["opp_rec_yds"]
        @out_of_bounds  = response["out_of_bounds"] || response['oob']
        @forced_fumbles = response["forced_fumbles"] || response['force_fum']
        @own_rec_tds    = response["own_rec_tds"] || response["own_rec_td"]
        @opp_rec_tds    = response["opp_rec_tds"] || response["opp_rec_td"]
        @ez_rec_tds     = response["ez_rec_tds"] # unknown ncaafb
      end
    end

  end
end

# ncaafb = {"fum"=>0, "lost"=>0, "oob"=>0, "own_rec"=>0, "own_rec_yds"=>0, "own_rec_td"=>0, "force_fum"=>3, "opp_rec"=>2, "opp_rec_yds"=>0, "opp_rec_td"=>0}

Version data entries

128 entries across 128 versions & 1 rubygems

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